Преглед на файлове

Document requirements for getHelp in CommandInfo

Change-Id: I12040fff5c0cfdb164d0429c7378df15de074f8d
Reviewed-on: http://gerrit.dmdirc.com/1015
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
Automatic-Compile: Shane Mc Cormack <shane@dmdirc.com>
Reviewed-by: Shane Mc Cormack <shane@dmdirc.com>
tags/0.6.4rc1
Chris Smith преди 14 години
родител
ревизия
f0a2d58433
променени са 1 файла, в които са добавени 13 реда и са изтрити 0 реда
  1. 13
    0
      src/com/dmdirc/commandparser/CommandInfo.java

+ 13
- 0
src/com/dmdirc/commandparser/CommandInfo.java Целия файл

@@ -45,6 +45,19 @@ public interface CommandInfo {
45 45
     
46 46
     /**
47 47
      * Returns a string representing the help message for this command.
48
+     * <p>
49
+     * The help text should generally be one line, and must start with
50
+     * the name of the command. It should then summarise the arguments of
51
+     * that command, using <code>&lt;angled&gt;</code> brackets for required
52
+     * arguments, and <code>[square]</code> brackets for optional arguments.
53
+     * Where multiple possibilities exist, they are typically separated by a
54
+     * pipe (<code>|</code>), for example: <code>command [--arg1|--arg2]</code>.
55
+     * The usage summary should then be followed by a dash and a brief
56
+     * summary of the purpose of the command.
57
+     * <p>
58
+     * A typical help message would look similar to:
59
+     * <p>
60
+     * <code>command [--arg &lt;param_for_arg&gt;] [someparam] - does x, y and z</code>
48 61
      *
49 62
      * @return the help message for this command
50 63
      */

Loading…
Отказ
Запис