Changeset 836
- Timestamp:
- 09/04/10 13:04:29 (17 months ago)
- Location:
- trunk/src/sce/codehelper
- Files:
-
- 2 modified
-
CHCommandArgument.java (modified) (3 diffs)
-
StaticCommandsCodeHelper.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sce/codehelper/CHCommandArgument.java
r791 r836 13 13 private String name = null; 14 14 private boolean optional = false; 15 private boolean secondOptional = false; 15 16 // the hint 16 17 private String hint = null; … … 33 34 } 34 35 35 /** 36 /** 37 * Creates a command argument. 38 * 39 * @param name the name 40 * @param optional whether the argument is optional 41 * @param secondOptional whether the argument is second optional 42 */ 43 public CHCommandArgument(String name, boolean optional, boolean secondOptional) { 44 this.name = name; 45 this.optional = optional; 46 this.secondOptional = secondOptional; 47 } 48 49 /** 36 50 * Returns the name of the argument. 37 51 * … … 51 65 } 52 66 53 /** 67 /** 68 * Returns true if the argument is second optional. 69 * 70 * @return true if second optional 71 */ 72 public boolean isSecondOptional() { 73 return secondOptional; 74 } 75 76 /** 54 77 * Returns the hint for this argument. 55 78 * -
trunk/src/sce/codehelper/StaticCommandsCodeHelper.java
r771 r836 134 134 if (commandUsage.substring(argumentEnd).trim().startsWith("]")) optional = true; 135 135 136 boolean secondOptional = false; 137 if (optional) { 138 if (commandUsage.substring(0, argumentStart-1).trim().endsWith("]")) { 139 secondOptional = true; 140 command.setUsage(commandUsage.replaceAll("\\[@" + argumentName + "@\\]", "")); 141 continue; 142 } 143 } 144 136 145 // create the argument 137 CHCommandArgument argument = new CHCommandArgument(argumentName, optional );146 CHCommandArgument argument = new CHCommandArgument(argumentName, optional, secondOptional); 138 147 argument.setHint(argumentXML.getAttribute("hint")); 139 148
![(please configure the [header_logo] section in trac.ini)](http://jlatexeditor.endrullis.de/chrome/site/logo_xmas.png)