public final class CommandHelper extends Object
Modifier and Type | Method and Description |
---|---|
static void |
maybePrintShowOutputWarning(CliConfig cliConfig,
Ansi ansi,
BuckEventBus buckEventBus)
Prints a warning to terminal about --show-output being replaced by --show-outputs if the
warning is enabled in the buck config and the environment supports ANSI.
|
static void |
print(com.google.common.collect.Multimap<String,QueryTarget> targetsAndDependencies,
PrintStream printStream)
Prints target and dependencies map into printStream.
|
static void |
print(Set<QueryTarget> targets,
PrintStream printStream)
Prints target set into printStream.
|
static void |
printJsonOutput(com.google.common.collect.Multimap<String,QueryTarget> targetsAndResults,
PrintStream printStream)
Prints target and result map's json representation into printStream.
|
static void |
printJsonOutput(Set<QueryTarget> targets,
PrintStream printStream)
Prints targets set json representation into printStream.
|
static void |
printShortDescription(Command command,
PrintStream printStream)
Prints short description of a given command into printStream.
|
public static void printJsonOutput(com.google.common.collect.Multimap<String,QueryTarget> targetsAndResults, PrintStream printStream) throws IOException
targetsAndResults
- input to query result multi mapprintStream
- print stream for outputIOException
- in case of IO exception during json writing operationpublic static void printJsonOutput(Set<QueryTarget> targets, PrintStream printStream) throws IOException
targets
- set of query resultprintStream
- print stream for outputIOException
- in case of IO exception during json writing operationpublic static void print(com.google.common.collect.Multimap<String,QueryTarget> targetsAndDependencies, PrintStream printStream)
targetsAndDependencies
- input to query result multi mapprintStream
- print stream for outputpublic static void print(Set<QueryTarget> targets, PrintStream printStream)
targets
- set of query resultprintStream
- print stream for outputpublic static void printShortDescription(Command command, PrintStream printStream)
command
- CLI commandprintStream
- print stream for outputpublic static void maybePrintShowOutputWarning(CliConfig cliConfig, Ansi ansi, BuckEventBus buckEventBus)