Rename ShellMethod.help() to value(), as it is the only mandatory attribute.

This commit is contained in:
Eric Bottard
2017-08-10 11:13:13 +02:00
parent 78f69d51e2
commit 5b07a1a89c
9 changed files with 22 additions and 22 deletions

View File

@@ -48,7 +48,7 @@ public class Clear {
@Autowired @Lazy
private Terminal terminal;
@ShellMethod(help = "Clear the shell screen.")
@ShellMethod("Clear the shell screen.")
public void clear() {
terminal.puts(InfoCmp.Capability.clear_screen);
}

View File

@@ -76,7 +76,7 @@ public class Help {
this.commandRegistry = commandRegistry;
}
@ShellMethod(help = "Display help about available commands.", prefix = "-")
@ShellMethod(value = "Display help about available commands.", prefix = "-")
public CharSequence help(
@ShellOption(defaultValue = ShellOption.NULL,
valueProvider = CommandValueProvider.class,

View File

@@ -41,7 +41,7 @@ public class Quit {
*/
public interface Command {}
@ShellMethod(help = "Exit the shell.", value = {"quit", "exit"})
@ShellMethod(value = "Exit the shell.", key = {"quit", "exit"})
public void quit() {
throw new ExitRequest();
}

View File

@@ -50,7 +50,7 @@ public class Stacktrace {
private ThrowableResultHandler throwableResultHandler;
@ShellMethod(value = ThrowableResultHandler.DETAILS_COMMAND_NAME, help = "Display the full stacktrace of the last error")
@ShellMethod(key = ThrowableResultHandler.DETAILS_COMMAND_NAME, value = "Display the full stacktrace of the last error")
public void stacktrace() {
if (throwableResultHandler.getLastError() != null) {
throwableResultHandler.getLastError().printStackTrace(terminal.writer());