Changeset 858

Show
Ignore:
Timestamp:
09/26/10 13:52:59 (3 years ago)
Author:
stefan
Message:

added 2 more commands

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/data/codehelper/commands.xml

    r855 r858  
    1414                       hint CDATA #IMPLIED 
    1515                       value CDATA #IMPLIED 
     16                       values CDATA #IMPLIED 
    1617                       completion CDATA #IMPLIED> 
    1718 
     
    131132              hint="mnemonic consisting of any sequence of letters, numbers, and punctuation symbols not containing a comma"/> 
    132133  </command> 
     134 
     135  <command name="\bibliography" usage="\bibliography{@file@}" hint="set bibliography file"> 
     136    <argument name="file" value="" completion="true" hint="filename of the bibliography file"/> 
     137  </command> 
     138 
     139  <command name="\bibliographystyle" usage="\bibliographystyle{@style@}" hint="sets the bibliography style"> 
     140    <argument name="style" value="" values="alpha|abbrv|plain|unsrt" hint="bibliography style"/> 
     141  </command> 
    133142 
    134143  <command name="\bigskip" hint="equivalent to \vspace{\bigskipamount}"> 
  • trunk/src/sce/codehelper/StaticCommandsCodeHelper.java

    r855 r858  
    150150      CHCommandArgument argument = new CHCommandArgument(argumentName, argumentValue, optional, secondOptional, argumentCompletion); 
    151151      argument.setHint(decode(argumentXML.getAttribute("hint"))); 
     152 
     153      String argumentValues = decode(argumentXML.getAttribute("values")); 
     154      if (argumentValues != null) { 
     155        for (String value : argumentValues.split("\\|")) { 
     156          argument.addValue(value); 
     157        } 
     158      } 
    152159 
    153160      // read the suggested values if there are some