Changeset 1246


Ignore:
Timestamp:
Jul 22, 2011, 9:11:02 AM (6 years ago)
Author:
stefan
Message:

quick help allows to open documentation of LaTeX packages via "texdoc"

Location:
trunk
Files:
1 added
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/CHANGELOG

    r1243 r1246  
    1515  - suggestions for package imports via alt+ENTER on undefined commands or environment
    1616  - quick help shows lists of packages and documentclasses providing command under cursor
     17  - quick help allows to open documentation of LaTeX packages via "texdoc"
    1718  - option to create macro from existing LaTeX code via control+shift+M or "LaTeX"->"Extract Command"
    1819  - exclude lines from being parsed by surrounding them with "%###"
  • trunk/data/codehelper/commands.xml

    r1231 r1246  
    4646  <command name="]" hint="define displaymath environment"/>
    4747
    48   <command name="documentclass" usage="documentclass[@opt@]{@style@}"
     48  <command name="documentclass" usage="\documentclass[@opt@]{@style@}"
    4949           hint="declares a document to be of the specified style">
    5050    <argument name="opt"/>
    51     <argument name="style"/>
    52   </command>
    53 
    54   <command name="DeclareRobustCommand" usage="DeclareRobustCommand{@cmd@}[@args@]{@def@}" hint="used to define a robust command">
     51    <argument name="style" value="" completion="true"/>
     52  </command>
     53
     54  <command name="DeclareRobustCommand" usage="\DeclareRobustCommand{@cmd@}[@args@]{@def@}" hint="used to define a robust command">
    5555    <argument name="cmd" hint="the name of the new command"/>
    5656    <argument name="args" hint="1 to 9 denoting the number of arguments"/>
     
    5959 
    6060
    61   <command name="addcontentsline" usage="addcontentsline{@file@}{@sec_unit@}{@entry@}"
     61  <command name="addcontentsline" usage="\addcontentsline{@file@}{@sec_unit@}{@entry@}"
    6262           hint="adds an entry to the specified list or table">
    6363    <argument name="file" hint="extension of the file on which information is to be written">
     
    7070  </command>
    7171
    72   <command name="addtocontents" usage="addtocontents{@file@}{@text@}">
     72  <command name="addtocontents" usage="\addtocontents{@file@}{@text@}">
    7373    <argument name="file" hint="adds text directly to the file that generates the table of contents or list of figures">
    7474      <argumentValue value="toc" hint="table of contents"/>
     
    7979  </command>
    8080
    81   <command name="addtocounter" usage="addtocounter{@counter@}{@value@}"
     81  <command name="addtocounter" usage="\addtocounter{@counter@}{@value@}"
    8282           hint="increments the counter by the amount specified by the value argument">
    8383    <argument name="counter"/>
     
    8585  </command>
    8686
    87   <command name="address" usage="address{@return address@}"
     87  <command name="address" usage="\address{@return address@}"
    8888           hint="return address, as it should appear on the letter and the envelope">
    8989    <argument name="return address"/>
    9090  </command>
    9191
    92   <command name="addtolength" usage="addtolength{@len-cmd@}{@len@}" hint="increments a length command (len-cmd)">
     92  <command name="addtolength" usage="\addtolength{@len-cmd@}{@len@}" hint="increments a length command (len-cmd)">
    9393    <argument name="len-cmd" hint="length command"/>
    9494    <argument name="len" hint="amount"/>
    9595  </command>
    9696
    97   <command name="addvspace" usage="addvspace{@length@}" hint="adds a vertical space of height length">
     97  <command name="addvspace" usage="\addvspace{@length@}" hint="adds a vertical space of height length">
    9898    <argument name="length"/>
    9999  </command>
    100100
    101   <command name="alph" usage="alph{@counter@}"
     101  <command name="alph" usage="\alph{@counter@}"
    102102           hint="causes the current value of counter to be printed in alphabetic characters">
    103103    <argument name="counter"/>
     
    107107  </command>
    108108
    109   <command name="arabic" usage="arabic{@counter@}"
     109  <command name="arabic" usage="\arabic{@counter@}"
    110110           hint="causes the current value of counter to be printed in Arabic numbers">
    111111    <argument name="counter"/>
    112112  </command>
    113113
    114   <command name="author" usage="author{@names@}" hint="declares the author(s)">
     114  <command name="author" usage="\author{@names@}" hint="declares the author(s)">
    115115    <argument name="names" hint="list of authors separated by \and commands"/>
    116116  </command>
     
    123123  </command>
    124124
    125   <command name="bf" usage="{\bf @|@}" hint="boldface typeface">
    126   </command>
    127 
    128   <command name="bibitem" usage="bibitem[@label@]{@cite_key@}" hint="generates an entry labeled by label">
     125  <command name="bf" usage="\{\bf @|@}" hint="boldface typeface">
     126  </command>
     127
     128  <command name="bibitem" usage="\bibitem[@label@]{@cite_key@}" hint="generates an entry labeled by label">
    129129    <argument name="label"/>
    130130    <argument name="cite_key"
     
    132132  </command>
    133133
    134   <command name="bibliography" usage="bibliography{@file@}" hint="set bibliography file">
     134  <command name="bibliography" usage="\bibliography{@file@}" hint="set bibliography file">
    135135    <argument name="file" type="file|defaultExtension=bib" value="" completion="true" hint="filename of the bibliography file"/>
    136136  </command>
    137137
    138   <command name="bibliographystyle" usage="bibliographystyle{@style@}" hint="sets the bibliography style">
     138  <command name="bibliographystyle" usage="\bibliographystyle{@style@}" hint="sets the bibliography style">
    139139    <argument name="style" value="" values="alpha|abbrv|plain|unsrt" hint="bibliography style"/>
    140140  </command>
     
    146146  </command>
    147147
    148   <command name="cal" usage="{\cal @|@}"
     148  <command name="cal" usage="\{\cal @|@}"
    149149           hint="twenty-six calligraphic letters are provided, these can only be used in math mode">
    150150  </command>
    151151
    152   <command name="caption" usage="caption[@lst-entry@]{@text of table caption@}"
     152  <command name="caption" usage="\caption[@lst-entry@]{@text of table caption@}"
    153153           hint="used to generate a caption for a figure or a table">
    154154    <argument name="lst-entry" hint="may be used to generate an entry for a list of figures or tables"/>
     
    163163  </command>
    164164
    165   <command name="chapter" usage="chapter{@title@}" hint="starts a new chapter in the document structure">
     165  <command name="chapter" usage="\chapter{@title@}" hint="starts a new chapter in the document structure">
    166166    <argument name="title" type="title"/>
    167167  </command>
    168168
    169   <command name="circle" usage="circle[@*@]{@diameter@}" hint="produces a circle of the specified diameter">
     169  <command name="circle" usage="\circle[@*@]{@diameter@}" hint="produces a circle of the specified diameter">
    170170    <argument name="*" hint="solid circle"/>
    171171    <argument name="diameter"/>
    172172  </command>
    173173
    174   <command name="cite" usage="cite[@text@]{@key_list@}" style="important_command"
     174  <command name="cite" usage="\cite[@text@]{@key_list@}" style="important_command"
    175175           hint="in-text citation to the references associated with the keys in key_list">
    176176    <argument name="text"/>
     
    184184  </command>
    185185
    186   <command name="cline" usage="cline{@i@-@j@}" hint="draws horizontal lines across the columns specified">
     186  <command name="cline" usage="\cline{@i@-@j@}" hint="draws horizontal lines across the columns specified">
    187187    <argument name="i" hint="beginning column"/>
    188188    <argument name="j" hint="ending column"/>
    189189  </command>
    190190
    191   <command name="closing" usage="closing{@text@}" hint="letter closes with a \closing command">
     191  <command name="closing" usage="\closing{@text@}" hint="letter closes with a \closing command">
    192192    <argument name="text" hint="mandatory argument, text is the desired text"/>
    193193  </command>
    194194
    195   <command name="dashbox" usage="dashbox{@dash length@}(@width@,@height@)[@pos@]{ @|@ }"
     195  <command name="dashbox" usage="\dashbox{@dash length@}(@width@,@height@)[@pos@]{ @|@ }"
    196196           hint="like \framebox but has an extra argument which specifies the width of each dash">
    197197    <argument name="dash length"/>
     
    201201  </command>
    202202
    203   <command name="date" usage="date{@text@}" hint="declares text to be the document's date">
     203  <command name="date" usage="\date{@text@}" hint="declares text to be the document's date">
    204204    <argument name="text"/>
    205205  </command>
     
    214214  </command>
    215215
    216   <command name="emph" usage="emph{@text@}" hint="emphasis the given text">
     216  <command name="emph" usage="\emph{@text@}" hint="emphasis the given text">
    217217    <argument name="text" type="italic"/>
    218218  </command>
    219219
    220   <command name="ensuremath" usage="ensuremath{@text set in math mode@}"
     220  <command name="ensuremath" usage="\ensuremath{@text set in math mode@}"
    221221           hint="the argument is always set in math mode, regardless of the current mode (LaTeX2e)">
    222222    <argument name="text set in math mode"/>
    223223  </command>
    224224
    225   <command name="fbox" usage="fbox{@text@}"
     225  <command name="fbox" usage="\fbox{@text@}"
    226226           hint="same as the \mbox command, except that it puts a rectangular frame around the box ">
    227227    <argument name="text"/>
     
    231231  </command>
    232232
    233   <command name="fnsymbol" usage="fnsymbol{@counter@}"
     233  <command name="fnsymbol" usage="\fnsymbol{@counter@}"
    234234           hint="causes the current value of counter to be printed for numbering footnotes (math mode)">
    235235    <argument name="counter"/>
    236236  </command>
    237237
    238   <command name="footnote" usage="footnote[@num@]{@text@}"
     238  <command name="footnote" usage="\footnote[@num@]{@text@}"
    239239           hint="places a numbered footnote at the bottom of the current page">
    240240    <argument name="num"/>
     
    242242  </command>
    243243
    244   <command name="footnotemark" usage="footnotemark[@num@]" hint="puts the footnote number in the text">
     244  <command name="footnotemark" usage="\footnotemark[@num@]" hint="puts the footnote number in the text">
    245245    <argument name="num"/>
    246246  </command>
     
    249249  </command>
    250250
    251   <command name="footnotetext" usage="footnotetext[@num@]{@text@}"
     251  <command name="footnotetext" usage="\footnotetext[@num@]{@text@}"
    252252           hint="places the text in the argument at the bottom of the page">
    253253    <argument name="num"/>
     
    255255  </command>
    256256
    257   <command name="frac" usage="frac{@num@}{@den@}" hint="produces the fraction num divided by den">
     257  <command name="frac" usage="\frac{@num@}{@den@}" hint="produces the fraction num divided by den">
    258258    <argument name="num"/>
    259259    <argument name="den"/>
    260260  </command>
    261261
    262   <command name="frame" usage="frame{ @|@ }"
     262  <command name="frame" usage="\frame{ @|@ }"
    263263           hint="puts a rectangular frame around the object specified in the argument">
    264264  </command>
    265265
    266   <command name="framebox" usage="framebox[@width@][@position@]{@text@}"
     266  <command name="framebox" usage="\framebox[@width@][@position@]{@text@}"
    267267           hint="same as the \makebox command, except that it puts a frame around the box">
    268268    <argument name="width"/>
     
    281281  </command>
    282282
    283   <command name="hrulefill" usage="" hint="produces a rubber length which will be filled with a horizontal rule">
    284   </command>
    285 
    286   <command name="hspace" usage="hspace[@*@]{@len@}" hint="adds horizontal space">
     283  <command name="hrulefill" usage="\" hint="produces a rubber length which will be filled with a horizontal rule">
     284  </command>
     285
     286  <command name="hspace" usage="\hspace[@*@]{@len@}" hint="adds horizontal space">
    287287    <argument name="*"/>
    288288    <argument name="len"/>
    289289  </command>
    290290
    291   <command name="huge" usage="{\huge @|@}" hint="aecond largest of 10 typefaces available">
    292   </command>
    293 
    294   <command name="Huge" usage="{\Huge @|@}" hint="largest of 10 typefaces available">
    295   </command>
    296 
    297   <command name="hyphenation" usage="hyphenation{@words@}" hint="declares allowed hyphenation points">
     291  <command name="huge" usage="\{\huge @|@}" hint="aecond largest of 10 typefaces available">
     292  </command>
     293
     294  <command name="Huge" usage="\{\Huge @|@}" hint="largest of 10 typefaces available">
     295  </command>
     296
     297  <command name="hyphenation" usage="\hyphenation{@words@}" hint="declares allowed hyphenation points">
    298298    <argument name="words"
    299299              hint="list of words, separated by spaces, in which each hyphenation point is indicated by a - character"/>
    300300  </command>
    301301
    302   <command name="include" usage="include{@file@}" hint="selective inclusion of files">
     302  <command name="include" usage="\include{@file@}" hint="selective inclusion of files">
    303303    <argument name="file" type="file|defaultExtension=tex" value="" completion="true"/>
    304304  </command>
    305305
    306   <command name="includeonly" usage="includeonly{@file_list@}"
     306  <command name="includeonly" usage="\includeonly{@file_list@}"
    307307           hint="controls which files will be read in by an \include command">
    308308    <argument name="file_list"/>
    309309  </command>
    310310
    311   <command name="includegraphics" usage="includegraphics[@opt@]{@file@}" hint="includes a graphic; requires package 'graphicx'">
     311  <command name="includegraphics" usage="\includegraphics[@opt@]{@file@}" hint="includes a graphic; requires package 'graphicx'">
    312312    <argument name="opt"/>
    313313    <argument name="file" type="file|defaultExtension=png" value="" completion="true"/>
     
    317317  </command>
    318318
    319   <command name="input" usage="input{@file@}" hint="causes the indicated file to be read and processed">
     319  <command name="input" usage="\input{@file@}" hint="causes the indicated file to be read and processed">
    320320    <argument name="file" type="file|defaultExtension=tex" value="" completion="true"/>
    321321  </command>
    322322
    323   <command name="it" usage="{\it @|@}" hint="italics typeface">
    324   </command>
    325 
    326   <command name="item" usage="item[@label@] @|@" hint="starts a new item in a List Environment">
     323  <command name="it" usage="\{\it @|@}" hint="italics typeface">
     324  </command>
     325
     326  <command name="item" usage="\item[@label@] @|@" hint="starts a new item in a List Environment">
    327327    <argument name="label"/>
    328328  </command>
     
    331331  </command>
    332332
    333   <command name="label" usage="label{@key@}" hint="assigns to the key the number of the current sectional unit" style="important_command">
     333  <command name="label" usage="\label{@key@}" hint="assigns to the key the number of the current sectional unit" style="important_command">
    334334    <argument name="key" type="label_def"/>
    335335  </command>
    336336
    337   <command name="large" usage="{\large @|@}" hint="slightly larger than default typeface size">
    338   </command>
    339 
    340   <command name="LARGE" usage="{\LARGE @|@}" hint="third largest of typefaces available">
    341   </command>
    342 
    343   <command name="Large" usage="{\Large @|@}" hint="fourth largest of typefaces available">
     337  <command name="large" usage="\{\large @|@}" hint="slightly larger than default typeface size">
     338  </command>
     339
     340  <command name="LARGE" usage="\{\LARGE @|@}" hint="third largest of typefaces available">
     341  </command>
     342
     343  <command name="Large" usage="\{\Large @|@}" hint="fourth largest of typefaces available">
    344344  </command>
    345345
     
    350350  </command>
    351351
    352   <command name="lefteqn" usage="lefteqn{@eqn@}" hint="prints eqn in display math style">
     352  <command name="lefteqn" usage="\lefteqn{@eqn@}" hint="prints eqn in display math style">
    353353    <argument name="eqn">
    354354    </argument>
    355355  </command>
    356356
    357   <command name="linebreak" usage="linebreak[@number@]" hint="break the current line">
     357  <command name="linebreak" usage="\linebreak[@number@]" hint="break the current line">
    358358    <argument name="number" hint="0 to 4, the higher the number, the more insistent the request is">
    359359    </argument>
     
    363363  </command>
    364364
    365   <command name="location" usage="location{@address@}" hint="modifies your organization's standard address">
     365  <command name="location" usage="\location{@address@}" hint="modifies your organization's standard address">
    366366    <argument name="address">
    367367    </argument>
    368368  </command>
    369369
    370   <command name="makebox" usage="makebox[@width@][@position@]{@text@}"
     370  <command name="makebox" usage="\makebox[@width@][@position@]{@text@}"
    371371           hint="creates a box to contain the specified text">
    372372    <argument name="width" hint="the width of the box">
     
    384384  </command>
    385385
    386   <command name="markboth" usage="markboth{@left head@}{@right head@}"
     386  <command name="markboth" usage="\markboth{@left head@}{@right head@}"
    387387           hint="conjunction with the page style myheadings">
    388388    <argument name="left head">
     
    392392  </command>
    393393
    394   <command name="markright" usage="markright{@right head@}" hint="conjunction with the page style myheadings">
     394  <command name="markright" usage="\markright{@right head@}" hint="conjunction with the page style myheadings">
    395395    <argument name="right head">
    396396    </argument>
    397397  </command>
    398398
    399   <command name="mbox" usage="mbox{@text@}" hint="creates a box just wide enough to hold the text in its argument">
     399  <command name="mbox" usage="\mbox{@text@}" hint="creates a box just wide enough to hold the text in its argument">
    400400    <argument name="text" hint="the text in the box">
    401401    </argument>
     
    405405  </command>
    406406
    407   <command name="newcommand" usage="newcommand{@cmd@}[@args@][@opt@]{@def@}" hint="used to define a command">
     407  <command name="newcommand" usage="\newcommand{@cmd@}[@args@][@opt@]{@def@}" hint="used to define a command">
    408408    <argument name="cmd" hint="the name of the new command">
    409409    </argument>
     
    416416  </command>
    417417
    418   <command name="newcounter" usage="newcounter{@newname@}[@oldcounter@]" hint="defines a new counter">
     418  <command name="newcounter" usage="\newcounter{@newname@}[@oldcounter@]" hint="defines a new counter">
    419419    <argument name="newname" hint="the name of the new counter">
    420420    </argument>
     
    423423  </command>
    424424
    425   <command name="newenvironment" usage="newenvironment{@name@}[@args@][@opt@]{@begdef@}{@enddef@}"
     425  <command name="newenvironment" usage="\newenvironment{@name@}[@args@][@opt@]{@begdef@}{@enddef@}"
    426426           hint="define an environment">
    427427    <argument name="name" hint="the name of the environment">
     
    437437  </command>
    438438
    439   <command name="newfont" usage="newfont{@cmd@}{@font_name@}"
     439  <command name="newfont" usage="\newfont{@cmd@}{@font_name@}"
    440440           hint="defines a command, which must not be currently defined, to be a declaration that selects the font named font_name to be the current font">
    441441    <argument name="cmd" hint="the command name">
     
    445445  </command>
    446446
    447   <command name="newlength" usage="newlength{\@gnat@}"
     447  <command name="newlength" usage="\newlength{\@gnat@}"
    448448           hint="defines the mandatory argument as a length command with a value of 0in">
    449449    <argument name="gnat" hint="the name of the length command">
     
    454454  </command>
    455455
    456   <command name="newsavebox" usage="newsavebox{@cmd@}" hint="declares cmd to be a bin for saving boxes">
     456  <command name="newsavebox" usage="\newsavebox{@cmd@}" hint="declares cmd to be a bin for saving boxes">
    457457    <argument name="cmd" hint="the command name">
    458458    </argument>
    459459  </command>
    460460
    461   <command name="newtheorem" usage="newtheorem{@env_name@}{@caption@}[@within@]"
     461  <command name="newtheorem" usage="\newtheorem{@env_name@}{@caption@}[@within@]"
    462462           hint="defines a theorem-like environment">
    463463    <argument name="env_name" hint="the name of the environment ">
     
    469469  </command>
    470470
    471   <command name="nocite" usage="nocite{@key_list@}" hint="produces no text, but writes a key list on the aux file">
     471  <command name="nocite" usage="\nocite{@key_list@}" hint="produces no text, but writes a key list on the aux file">
    472472    <argument name="key_list" type="cite_key_list" value="" completion="true" hint="the key list">
    473473    </argument>
     
    477477  </command>
    478478
    479   <command name="nolinebreak" usage="nolinebreak[@number@]"
     479  <command name="nolinebreak" usage="\nolinebreak[@number@]"
    480480           hint="prevents LaTeX from breaking the current line at the point of the command">
    481481    <argument name="number" hint="0 to 4, the higher the number, the more insistent the request is">
     
    486486  </command>
    487487
    488   <command name="nopagebreak" usage="nopagebreak[@number@]"
     488  <command name="nopagebreak" usage="\nopagebreak[@number@]"
    489489           hint="prevents LaTeX form breaking the current page at the point of the command">
    490490    <argument name="number" hint="0 to 4, the higher the number, the more insistent the request is">
     
    495495  </command>
    496496
    497   <command name="opening" usage="opening{@text@}" hint="the letter begins with the \opening command">
     497  <command name="opening" usage="\opening{@text@}" hint="the letter begins with the \opening command">
    498498    <argument name="text" hint="what ever text you wish to start your letter">
    499499    </argument>
    500500  </command>
    501501
    502   <command name="oval" usage="oval(@width@,@height@)[@portion@]" hint="produces a rectangle with rounded corners">
     502  <command name="oval" usage="\oval(@width@,@height@)[@portion@]" hint="produces a rectangle with rounded corners">
    503503    <argument name="width">
    504504    </argument>
     
    513513  </command>
    514514
    515   <command name="overline" usage="overline{@equation@}" hint="causes the argument to be overlined">
     515  <command name="overline" usage="\overline{@equation@}" hint="causes the argument to be overlined">
    516516    <argument name="equation">
    517517    </argument>
    518518  </command>
    519519
    520   <command name="pagebreak" usage="pagebreak[@number@]" hint="break the current page at the point of the command">
     520  <command name="pagebreak" usage="\pagebreak[@number@]" hint="break the current page at the point of the command">
    521521    <argument name="number" hint="0 to 4, the higher the number, the more insistent the request is">
    522522    </argument>
    523523  </command>
    524524
    525   <command name="pagenumbering" usage="pagenumbering{@num_style@}" hint="specifies the style of page numbers">
     525  <command name="pagenumbering" usage="\pagenumbering{@num_style@}" hint="specifies the style of page numbers">
    526526    <argument name="num_style" hint="the style of page numbers">
    527527      <argumentValue value="arabic" hint="Arabic numerals"/>
     
    533533  </command>
    534534
    535   <command name="pageref" usage="pageref{@key@}" hint="produces the page number refering to the label">
     535  <command name="pageref" usage="\pageref{@key@}" hint="produces the page number refering to the label">
    536536    <argument name="key" hint="the label in the text">
    537537    </argument>
    538538  </command>
    539539
    540   <command name="pagestyle" usage="pagestyle{@option@}"
     540  <command name="pagestyle" usage="\pagestyle{@option@}"
    541541           hint="changes the style from the current page on throughout the remainder of your document">
    542542    <argument name="option">
     
    551551  </command>
    552552
    553   <command name="paragraph" usage="paragraph{@title@}" hint="starts a new paragraph in the document structure" style="section">
     553  <command name="paragraph" usage="\paragraph{@title@}" hint="starts a new paragraph in the document structure" style="section">
    554554    <argument name="title">
    555555    </argument>
    556556  </command>
    557557
    558   <command name="part" usage="part{@title@}" hint="starts a new part in the document structure">
     558  <command name="part" usage="\part{@title@}" hint="starts a new part in the document structure">
    559559    <argument name="title">
    560560    </argument>
    561561  </command>
    562562
    563   <command name="parbox" usage="parbox[@position@]{@width@}{@text@}"
     563  <command name="parbox" usage="\parbox[@position@]{@width@}{@text@}"
    564564           hint="creates a box whose contents are created in paragraph mode">
    565565    <argument name="position">
     
    582582  </command>
    583583
    584   <command name="providecommand" usage="providecommand{@cmd@}[@args@][@opt@]{@def@}"
     584  <command name="providecommand" usage="\providecommand{@cmd@}[@args@][@opt@]{@def@}"
    585585           hint="define (or redefine) a command">
    586586    <argument name="cmd" hint="the name of the new command">
     
    594594  </command>
    595595
    596   <command name="put" usage="put(@x-coord@,@y-coord@){@object@}" hint="places an object at the given coordinates">
     596  <command name="put" usage="\put(@x-coord@,@y-coord@){@object@}" hint="places an object at the given coordinates">
    597597    <argument name="x-coord">
    598598    </argument>
     
    609609  </command>
    610610
    611   <command name="raisebox" usage="raisebox{@distance@}[@extend-above@][@extend-below@]{@|@}"
     611  <command name="raisebox" usage="\raisebox{@distance@}[@extend-above@][@extend-below@]{@|@}"
    612612           hint="creates a LR box containing text; it is used to raise or lower text">
    613613    <argument name="distance" hint="specifies how high the text is to be raised">
     
    619619  </command>
    620620
    621   <command name="ref" usage="ref{@key@}" style="important_command"
     621  <command name="ref" usage="\ref{@key@}" style="important_command"
    622622           hint="produces the number of the sectional unit, equation number, ... of the corresponding \label command">
    623623    <argument name="key" type="label_ref" value="" completion="true" hint="corresponding label"/>
    624624  </command>
    625625
    626   <command name="eqref" usage="eqref{@key@}" style="important_command"
     626  <command name="eqref" usage="\eqref{@key@}" style="important_command"
    627627           hint="produces the number of the sectional unit, equation number, ... of the corresponding \label command">
    628628    <argument name="key" type="label_ref" value="" completion="true" hint="corresponding label"/>
     
    635635  </command>
    636636
    637   <command name="roman" usage="roman{@counter@}"
     637  <command name="roman" usage="\roman{@counter@}"
    638638           hint="causes the current value of counter to be printed in roman numerals">
    639639    <argument name="counter">
     
    641641  </command>
    642642
    643   <command name="rule" usage="rule[@raise-height@]{@width@}{@height@}"
     643  <command name="rule" usage="\rule[@raise-height@]{@width@}{@height@}"
    644644           hint="generates a rectangular 'blob of ink.', it can be used to produce horizontal or vertical lines">
    645645    <argument name="raise-height" hint="specifies how high to raise the rule">
     
    651651  </command>
    652652
    653   <command name="savebox" usage="savebox{@cmd@}[@width@][@pos@]{@text@}" hint="typeset text in a box">
     653  <command name="savebox" usage="\savebox{@cmd@}[@width@][@pos@]{@text@}" hint="typeset text in a box">
    654654    <argument name="cmd">
    655655    </argument>
     
    662662  </command>
    663663
    664   <command name="sbox" usage="sbox{@cmd@}{@text@}" hint="typeset text in a box">
     664  <command name="sbox" usage="\sbox{@cmd@}{@text@}" hint="typeset text in a box">
    665665    <argument name="cmd">
    666666    </argument>
     
    675675  </command>
    676676
    677   <command name="section" usage="section{@title@}" hint="starts a new section in the document structure" style="section">
     677  <command name="section" usage="\section{@title@}" hint="starts a new section in the document structure" style="section">
    678678    <argument name="title" type="title"/>
    679679  </command>
    680680
    681   <command name="setcounter" usage="setcounter{@counter@}{@value@}" hint="sets the value of the specified counter">
     681  <command name="setcounter" usage="\setcounter{@counter@}{@value@}" hint="sets the value of the specified counter">
    682682    <argument name="counter">
    683683    </argument>
     
    686686  </command>
    687687
    688   <command name="setlength" usage="setlength{@len-cmd@}{@len@}" hint="used to set the value of a length command">
     688  <command name="setlength" usage="\setlength{@len-cmd@}{@len@}" hint="used to set the value of a length command">
    689689    <argument name="len-cmd">
    690690    </argument>
     
    693693  </command>
    694694
    695   <command name="settowidth" usage="settowidth{@len-cmd@}{@text@}" hint="">
     695  <command name="settowidth" usage="\settowidth{@len-cmd@}{@text@}" hint="">
    696696    <argument name="len-cmd">
    697697    </argument>
     
    703703  </command>
    704704
    705   <command name="shortstack" usage="shortstack[@position@]{@ ... \\ ... \\ ... @}" hint="produces a stack of objects">
     705  <command name="shortstack" usage="\shortstack[@position@]{@ ... \\ ... \\ ... @}" hint="produces a stack of objects">
    706706    <argument name="position">
    707707      <argumentValue value="r" hint="moves the objects to the right of the stack"/>
     
    713713  </command>
    714714
    715   <command name="signature" usage="signature{@your name@}"
     715  <command name="signature" usage="\signature{@your name@}"
    716716           hint="your name, as it should appear at the end of the letter underneath the space for your signature">
    717717    <argument name="your name">
     
    728728  </command>
    729729
    730   <command name="renewcommand" usage="renewcommand{@cmd@}[@args@][@opt@]{@def@}" hint="used to define a command">
     730  <command name="renewcommand" usage="\renewcommand{@cmd@}[@args@][@opt@]{@def@}" hint="used to define a command">
    731731    <argument name="cmd" hint="the name of the new command">
    732732    </argument>
     
    739739  </command>
    740740
    741   <command name="sqrt" usage="sqrt[@root@]{@arg@}"
     741  <command name="sqrt" usage="\sqrt[@root@]{@arg@}"
    742742           hint="produces the square root (radical) symbol with the argument as radicand">
    743743    <argument name="root">
     
    747747  </command>
    748748
    749   <command name="stackrel" usage="stackrel{@top@}{@bot@}"
     749  <command name="stackrel" usage="\stackrel{@top@}{@bot@}"
    750750           hint="can be used to stack something above something else; used in math mode">
    751751    <argument name="top">
     
    755755  </command>
    756756
    757   <command name="subparagraph" usage="subparagraph{@title@}" hint="starts a new subparagraph in the document structure" style="section">
     757  <command name="subparagraph" usage="\subparagraph{@title@}" hint="starts a new subparagraph in the document structure" style="section">
    758758    <argument name="title" type="title">
    759759    </argument>
    760760  </command>
    761761
    762   <command name="subsection" usage="subsection{@title@}" hint="starts a new subsection in the document structure" style="section">
     762  <command name="subsection" usage="\subsection{@title@}" hint="starts a new subsection in the document structure" style="section">
    763763    <argument name="title" type="title"/>
    764764  </command>
    765765
    766   <command name="subsubsection" usage="subsubsection{@title@}" hint="starts a new subsubsection in the document structure" style="section">
     766  <command name="subsubsection" usage="\subsubsection{@title@}" hint="starts a new subsubsection in the document structure" style="section">
    767767    <argument name="title" type="title">
    768768    </argument>
     
    772772  </command>
    773773
    774   <command name="telephone" usage="telephone{@number@}" hint="this is your telephone number">
     774  <command name="telephone" usage="\telephone{@number@}" hint="this is your telephone number">
    775775    <argument name="number">
    776776    </argument>
    777777  </command>
    778778
    779   <command name="text" usage="text{@text@}" hint="include normal text in math environments">
     779  <command name="text" usage="\text{@text@}" hint="include normal text in math environments">
    780780    <argument name="text"/>
    781781  </command>
    782782
    783   <command name="textit" usage="textit{@text@}" hint="italic font">
     783  <command name="textit" usage="\textit{@text@}" hint="italic font">
    784784    <argument name="text" type="italic"/>
    785785  </command>
    786786
    787   <command name="textbf" usage="textbf{@text@}" hint="bold font">
     787  <command name="textbf" usage="\textbf{@text@}" hint="bold font">
    788788    <argument name="text" type="bold"/>
    789789  </command>
    790790
    791   <command name="textrm" usage="textrm{@text@}" hint="roman font">
     791  <command name="textrm" usage="\textrm{@text@}" hint="roman font">
    792792    <argument name="text"/>
    793793  </command>
    794794
    795   <command name="textsc" usage="textsc{@text@}" hint="small caps">
     795  <command name="textsc" usage="\textsc{@text@}" hint="small caps">
    796796    <argument name="text"/>
    797797  </command>
    798798
    799   <command name="textsf" usage="textsf{@text@}" hint="sans serif font">
     799  <command name="textsf" usage="\textsf{@text@}" hint="sans serif font">
    800800    <argument name="text"/>
    801801  </command>
    802802
    803   <command name="textsl" usage="textsl{@text@}" hint="slanted font">
     803  <command name="textsl" usage="\textsl{@text@}" hint="slanted font">
    804804    <argument name="text" type="italic"/>
    805805  </command>
    806806
    807   <command name="texttt" usage="texttt{@text@}" hint="type writer font">
     807  <command name="texttt" usage="\texttt{@text@}" hint="type writer font">
    808808    <argument name="text"/>
    809809  </command>
     
    815815  </command>
    816816
    817   <command name="thanks" usage="thanks{@text@}" hint="produces a footnote to the title">
     817  <command name="thanks" usage="\thanks{@text@}" hint="produces a footnote to the title">
    818818    <argument name="text">
    819819    </argument>
    820820  </command>
    821821
    822   <command name="thispagestyle" usage="thispagestyle{@option@}" hint="changes the style for the current page">
     822  <command name="thispagestyle" usage="\thispagestyle{@option@}" hint="changes the style for the current page">
    823823    <argument name="option">
    824824    </argument>
     
    828828  </command>
    829829
    830   <command name="title" usage="title{@text@}" hint="declares text to be the title">
     830  <command name="title" usage="\title{@text@}" hint="declares text to be the title">
    831831    <argument name="text">
    832832    </argument>
     
    842842  </command>
    843843
    844   <command name="typeout" usage="typeout{@msg@}" hint="prints msg on the terminal and in the log file">
     844  <command name="typeout" usage="\typeout{@msg@}" hint="prints msg on the terminal and in the log file">
    845845    <argument name="msg">
    846846    </argument>
    847847  </command>
    848848
    849   <command name="typein" usage="typein[@cmd@]{@msg@}"
     849  <command name="typein" usage="\typein[@cmd@]{@msg@}"
    850850           hint="prints msg on the terminal and causes LaTeX to stop and wait for you to type a line of input, ending with return">
    851851    <argument name="cmd" hint="command name">
     
    855855  </command>
    856856
    857   <command name="underbrace" usage="underbrace{@formula@} "
     857  <command name="underbrace" usage="\underbrace{@formula@} "
    858858           hint="generates a brace underneath the formula (math mode)">
    859859    <argument name="formula">
     
    861861  </command>
    862862
    863   <command name="underline" usage="underline{@text@}" hint="causes the argument text to be underlined">
     863  <command name="underline" usage="\underline{@text@}" hint="causes the argument text to be underlined">
    864864    <argument name="text">
    865865    </argument>
     
    869869  </command>
    870870
    871   <command name="usebox" usage="usebox{@cmd@}"
     871  <command name="usebox" usage="\usebox{@cmd@}"
    872872           hint="prints the box most recently saved in cmd by a \savebox or \sbox command">
    873873    <argument name="cmd">
     
    875875  </command>
    876876
    877   <command name="usecounter" usage="usecounter{@counter@}"
     877  <command name="usecounter" usage="\usecounter{@counter@}"
    878878           hint="used in the second argument of the list environment to allow the counter specified to be used to number the list items">
    879879    <argument name="counter"/>
    880880  </command>
    881881
    882   <command name="usepackage" usage="usepackage[@options@]{@packages@}"
     882  <command name="usepackage" usage="\usepackage[@options@]{@packages@}"
    883883           hint="loads the given LaTeX packages">
    884884    <argument name="options"/>
    885     <argument name="packages"/>
    886   </command>
    887 
    888   <command name="value" usage="value{@counter@}"
     885    <argument name="packages" value="" completion="true"/>
     886  </command>
     887
     888  <command name="value" usage="\value{@counter@}"
    889889           hint="produces the value of the counter named in the mandatory argument">
    890890    <argument name="counter">
     
    895895  </command>
    896896
    897   <command name="vector" usage="vector(@x-slope@,@y-slope@){@length@}"
     897  <command name="vector" usage="\vector(@x-slope@,@y-slope@){@length@}"
    898898           hint="draws an arrow of the specified length and slope (picture environment)">
    899899    <argument name="x-slope">
     
    905905  </command>
    906906
    907   <command name="verb" usage="verb=@|@=" hint="verbatim text">
     907  <command name="verb" usage="\verb=@|@=" hint="verbatim text">
    908908  </command>
    909909
     
    914914  </command>
    915915
    916   <command name="vphantom" usage="vphantom{@construct@}"
     916  <command name="vphantom" usage="\vphantom{@construct@}"
    917917           hint="creates a zero-width object with the height of construct">
    918918    <argument name="construct">
     
    920920  </command>
    921921
    922   <command name="vspace" usage="vspace[@*@]{@length@}" hint="adds vertical space">
     922  <command name="vspace" usage="\vspace[@*@]{@length@}" hint="adds vertical space">
    923923    <argument name="*">
    924924    </argument>
     
    927927  </command>
    928928
    929   <command name="begin" usage="begin{@environment@}@|@&nl;\end{@environment@}" hint="paragraph-making environments" style="begin">
    930     <argument name="environment" type="opening_env">
     929  <command name="begin" usage="\begin{@environment@}@|@&nl;\end{@environment@}" hint="paragraph-making environments" style="begin">
     930    <argument name="environment" type="opening_env" value="" completion="true">
    931931      <argumentValue value="abstract"/>
    932932      <argumentValue value="array"/>
     
    959959  </command>
    960960
    961   <command name="end" usage="end{@environment@}" hint="closing environment" style="begin">
     961  <command name="end" usage="\end{@environment@}" hint="closing environment" style="begin">
    962962    <argument name="environment" type="closing_env"/>
    963963  </command>
    964964
    965965  <environment name="picture">
    966     <command name="line" usage="line(@x-slope@,@y-slope@){@length@}"
     966    <command name="line" usage="\line(@x-slope@,@y-slope@){@length@}"
    967967             hint="draws a line of the specified length and slope">
    968968      <argument name="x-slope" hint="the x-coordinate of the slope">
     
    974974    </command>
    975975
    976     <command name="linethickness" usage="linethickness{@dimension@}"
     976    <command name="linethickness" usage="\linethickness{@dimension@}"
    977977             hint="declares the thickness of horizontal and vertical lines in a picture environment ">
    978978      <argument name="dimension" hint="must be a positive length">
     
    980980    </command>
    981981
    982     <command name="makebox" usage="makebox(@width@,@height@)[@position@]{@text@}"
     982    <command name="makebox" usage="\makebox(@width@,@height@)[@position@]{@text@}"
    983983             hint="creates a box with a specified with and height">
    984984      <argument name="width" hint="the width of the box">
     
    996996    </command>
    997997
    998     <command name="multiput" usage="multiput(@x coord@,@y coord@)(@delta x@,@delta y@){@number of copies@}{@object@}"
     998    <command name="multiput" usage="\multiput(@x coord@,@y coord@)(@delta x@,@delta y@){@number of copies@}{@object@}"
    999999             hint="used to put the same object in a regular pattern across a picture">
    10001000      <argument name="x coord">
     
    10141014
    10151015  <environment name="math">
    1016     <command name="mathcal" usage="mathcal{@cal@}" hint="calligraphic letter (LaTeX2e)">
     1016    <command name="mathcal" usage="\mathcal{@cal@}" hint="calligraphic letter (LaTeX2e)">
    10171017      <argument name="cal" hint="the letter">
    10181018      </argument>
    10191019    </command>
    10201020
    1021     <command name="mathop" usage="mathop{@|@}"
     1021    <command name="mathop" usage="\mathop{@|@}"
    10221022             hint="argument is considered to be a single variable sized math symbol">
    10231023    </command>
     
    10261026    </command>
    10271027
    1028     <command name="overbrace" usage="overbrace{@equation@}" hint="generates a brace over equation">
     1028    <command name="overbrace" usage="\overbrace{@equation@}" hint="generates a brace over equation">
    10291029      <argument name="equation">
    10301030      </argument>
     
    10331033
    10341034  <environment name="array &amp; table">
    1035     <command name="multicolumn" usage="multicolumn{@cols@}{@pos@}{@text@}"
     1035    <command name="multicolumn" usage="\multicolumn{@cols@}{@pos@}{@text@}"
    10361036             hint="used to make an entry that spans several columns">
    10371037      <argument name="cols" hint="the number of columns to span">
  • trunk/data/codehelper/liveTemplates.xml

    r1145 r1246  
    110110    <argument name="def" hint="the text to be substituted for every occurrence of cmd"/>
    111111  </command>
    112   <command name="env" usage="\begin{@env@}@opt@&nl;  @|@&nl;\end{@env@}" hint="tabular environment">
    113     <argument name="env"/>
    114     <argument name="opt" value=""/>
     112  <command name="env" usage="\begin{@env@}@|@&nl;\end{@env@}" hint="tabular environment">
     113    <argument name="env" value="" completion="true"/>
    115114  </command>
    116115</commandList>
  • trunk/src/jlatexeditor/PackagesExtractor.java

    r1226 r1246  
    44import org.xml.sax.helpers.DefaultHandler;
    55import org.xml.sax.helpers.XMLReaderFactory;
     6import sce.codehelper.CHCommand;
     7import sce.codehelper.CHCommandArgument;
    68import util.StreamUtils;
    79import util.Trie;
     
    324326      super(name, argCount, optionalArg, pack, usageCount);
    325327    }
     328
     329    public CHCommand toCHCommand() {
     330      CHCommand chCommand = new CHCommand("<html><body><b>" + name + "</b>");
     331      String template = "\\" + name;
     332      if (optionalArg != null) {
     333        template += "[@opt@]";
     334        chCommand.addArgument(new CHCommandArgument("opt", optionalArg, true));
     335      }
     336      for (int i=1; i<=argCount; i++) {
     337        template += "{@arg" + i + "@}";
     338        chCommand.addArgument(new CHCommandArgument("arg" + i, "", false));
     339      }
     340      chCommand.setUsage(template);
     341      return chCommand;
     342    }
    326343  }
    327344
  • trunk/src/jlatexeditor/SCEManager.java

    r1206 r1246  
    2525import java.beans.PropertyChangeEvent;
    2626import java.beans.PropertyChangeListener;
     27import java.net.URL;
    2728
    2829/**
  • trunk/src/jlatexeditor/codehelper/Command.java

    r1231 r1246  
    5050  public CHCommand toCHCommand() {
    5151    CHCommand chCommand = new CHCommand("<html><body><b>" + name + "</b>");
    52     String template = name;
     52    String template = "\\" + name;
    5353    if (optional != null) {
    5454      template += "[@opt@]";
  • trunk/src/jlatexeditor/codehelper/CommandsCodeHelper.java

    r1245 r1246  
    55import jlatexeditor.SCEManager;
    66import sce.codehelper.CHCommand;
     7import sce.codehelper.CHCommandArgument;
    78import sce.codehelper.PatternPair;
    89import sce.codehelper.WordWithPos;
     
    1314import util.TrieSet;
    1415
     16import java.util.ArrayList;
    1517import java.util.Arrays;
     18import java.util.HashSet;
    1619import java.util.List;
    1720
     
    4144  public CommandsCodeHelper() {
    4245    super("commands");
    43     pattern = new PatternPair("\\\\(\\p{L}*)");
     46    pattern = new PatternPair("(\\\\\\p{L}*)");
    4447  }
    4548
     
    5356  }
    5457
    55   public Iterable<CHCommand> getCompletions(String search, Function1<TrieSet<PackagesExtractor.Command>, Boolean> filterFunc) {
     58  public Iterable<CHCommand> getCompletions(String _search, Function1<TrieSet<PackagesExtractor.Command>, Boolean> filterFunc) {
     59    String search = _search.substring(1);
    5660    final Trie<Command> userCommands = SCEManager.getBackgroundParser().getCommands();
    5761    final Trie<CHCommand> standardCommands = SCEManager.getLatexCommands().getCommands();
     
    7377          return chCommand;
    7478        }
    75         return new ValueCompletion(cmd);
     79
     80        return new LazyCHCommand(cmd);
    7681      }
    7782    }).toList(20);
     
    8792  }
    8893
    89   public String getMaxCommonPrefix(String search) {
     94  public String getMaxCommonPrefix(String _search) {
     95    String search = _search.substring(1);
     96
    9097    List<AbstractTrie<? extends Object>> tries = Arrays.asList(
    9198      SCEManager.getBackgroundParser().getCommands(),
     
    95102    );
    96103
    97     String maxPrefix = null;
     104    String maxPrefix = search;
    98105    for (AbstractTrie<? extends Object> trie : tries) {
    99106      String maxCommonPrefix = trie.getMaxCommonPrefix(search);
     
    107114    }
    108115
    109     return maxPrefix;
     116    return "\\" + maxPrefix;
     117  }
     118
     119  private class LazyCHCommand extends CHCommand {
     120    private CHCommand lazyCHCommand;
     121    private final String cmd;
     122
     123    public LazyCHCommand(String cmd) {
     124      super(cmd);
     125      this.cmd = cmd;
     126    }
     127
     128    private CHCommand getLazyCHCommand() {
     129      if (lazyCHCommand == null) {
     130        HashSet<PackagesExtractor.Command> commands = new HashSet<PackagesExtractor.Command>();
     131        commands.addAll(PackagesExtractor.getPackageParser().getCommands().getOrEmpty(cmd));
     132        commands.addAll(PackagesExtractor.getDocClassesParser().getCommands().getOrEmpty(cmd));
     133
     134        PackagesExtractor.Command shortestCommand = null;
     135        for (PackagesExtractor.Command command1 : commands) {
     136          if (shortestCommand == null) {
     137            shortestCommand = command1;
     138          } else if (shortestCommand.getArgCount() > command1.getArgCount()) {
     139            shortestCommand = command1;
     140          }
     141        }
     142
     143        assert shortestCommand != null;
     144        lazyCHCommand = shortestCommand.toCHCommand();
     145      }
     146
     147      return lazyCHCommand;
     148    }
     149
     150    @Override
     151    public String getUsage() {
     152      return getLazyCHCommand().getUsage();
     153    }
     154
     155    @Override
     156    public String getHint() {
     157      return getLazyCHCommand().getHint();
     158    }
     159
     160    @Override
     161    public ArrayList<CHCommandArgument> getArguments() {
     162      return getLazyCHCommand().getArguments();
     163    }
    110164  }
    111165}
  • trunk/src/jlatexeditor/codehelper/EnvironmentCodeHelper.java

    r1245 r1246  
    7171    );
    7272
    73     String maxPrefix = null;
     73    String maxPrefix = search;
    7474    for (AbstractTrie<? extends Object> trie : tries) {
    7575      String maxCommonPrefix = trie.getMaxCommonPrefix(search);
  • trunk/src/jlatexeditor/quickhelp/HelpUrlHandler.java

    r1231 r1246  
    9898          hintString = " - " + cmd.getPack().getDescription();
    9999        }
    100         packs.add("<li>" + cmd.getPack().getName() + hintString + "</li>");
     100        packs.add("<li>" + cmd.getPack().getName() + hintString + " (<a href='texdoc:" + cmd.getPack().getName() + "'>doc</a>)</li>");
    101101      }
    102102      Collections.sort(packs);
     
    118118  public static void register() {
    119119    ConfigurableStreamHandlerFactory.register("help", new HelpUrlHandler());
     120    ConfigurableStreamHandlerFactory.register("texdoc", new TexDocHandler());
    120121  }
    121122
  • trunk/src/jlatexeditor/quickhelp/LatexQuickHelp.java

    r1154 r1246  
    55import sce.component.SCEDocument;
    66import sce.quickhelp.QuickHelp;
     7import util.ProcessUtil;
    78import util.StreamUtils;
     9import util.SystemUtils;
    810
    9 import java.io.BufferedReader;
    10 import java.io.FileNotFoundException;
    11 import java.io.IOException;
    12 import java.io.InputStreamReader;
     11import java.io.*;
    1312import java.net.URL;
    1413import java.util.Enumeration;
  • trunk/src/sce/codehelper/StaticCommandsReader.java

    r1145 r1246  
    9595    // create the command and set usage + hint
    9696    CHCommand command = new CHCommand(commandName);
    97     command.setUsage(decode(commandXML.getAttribute("usage")));
     97    String usage = decode(commandXML.getAttribute("usage"));
     98    command.setUsage(usage);
     99    if (usage == null) {
     100      command.setUsage("\\" + command);
     101    }
    98102    command.setStyle(decode(commandXML.getAttribute("style")));
    99103    command.setHint(decode(commandXML.getAttribute("hint")));
  • trunk/src/sce/component/SCEPaneUI.java

    r1203 r1246  
    434434    SwingUtilities.replaceUIInputMap(pane, JComponent.WHEN_FOCUSED, null);
    435435    SwingUtilities.replaceUIInputMap(pane, JComponent.WHEN_IN_FOCUSED_WINDOW, null);
     436  }
     437
     438  public QuickHelpPane getQuickHelpPane() {
     439    return quickHelpPane;
    436440  }
    437441
  • trunk/src/sce/quickhelp/QuickHelp.java

    r744 r1246  
    22
    33import sce.component.SCEDocument;
     4
     5import java.net.URL;
    46
    57/**
  • trunk/src/sce/quickhelp/QuickHelpPane.java

    r1154 r1246  
    1515import java.beans.PropertyChangeListener;
    1616import java.io.IOException;
     17import java.util.ArrayList;
    1718
    1819/**
     
    2829  SCECaret caret = null;
    2930
    30   /**
    31    * Window like component showing the help information.
    32    */
     31  /** Window like component showing the help information. */
    3332  JPopupMenu popup = null;
    3433  JEditorPane htmlPane = null;
    35   /**
    36    * Quick help.
    37    */
     34  /** Quick help. */
    3835  QuickHelp quickHelp;
    3936
     
    7370    try {
    7471      if (e.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) htmlPane.setPage(e.getURL());
     72    } catch (NullPointerException ignored) {
    7573    } catch (IOException ignored) {
    7674    }
  • trunk/src/util/TrieSet.java

    r1231 r1246  
    8282  private HashSet<T> get(char[] chars) {
    8383    return get(chars, 0);
     84  }
     85
     86  public HashSet<T> getOrEmpty(String cmd) {
     87    HashSet<T> ts = get(cmd);
     88    if (ts == null) {
     89      return new HashSet<T>();
     90    }
     91    return ts;
    8492  }
    8593
Note: See TracChangeset for help on using the changeset viewer.