Skip to content
Snippets Groups Projects
Commit 9cfcf2fb authored by dgelessus's avatar dgelessus
Browse files

Remove Command.getLongHelp()

parent 94d0aa78
No related branches found
No related tags found
No related merge requests found
...@@ -11,9 +11,5 @@ public interface Command { ...@@ -11,9 +11,5 @@ public interface Command {
public abstract @NotNull String getShortHelp(); public abstract @NotNull String getShortHelp();
public default @NotNull String getLongHelp() {
return this.getSyntax() + "\n\n" + this.getShortHelp();
}
public abstract @NotNull DisplayData run(final @NotNull ProBKernel kernel, final @NotNull String argString); public abstract @NotNull DisplayData run(final @NotNull ProBKernel kernel, final @NotNull String argString);
} }
...@@ -56,7 +56,7 @@ public final class HelpCommand implements Command { ...@@ -56,7 +56,7 @@ public final class HelpCommand implements Command {
if (command == null) { if (command == null) {
throw new UserErrorException(String.format("Cannot display help for unknown command \"%s\"", commandName)); throw new UserErrorException(String.format("Cannot display help for unknown command \"%s\"", commandName));
} }
return new DisplayData(command.getLongHelp()); return new DisplayData(command.getSyntax() + "\n\n" + command.getShortHelp());
} else { } else {
throw new UserErrorException("Expected at most 1 argument, got " + args.size()); throw new UserErrorException("Expected at most 1 argument, got " + args.size());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment