@Override public String getName() { return actionClass.getAnnotation(Command.class).name(); }
@Override public String getName() { return actionClass.getAnnotation(Command.class).name(); }
File output = new File(targetFolder, cmd.scope() + "-" + cmd.name() + "." + commandSuffix); FileOutputStream outStream = new FileOutputStream(output); PrintStream out = new PrintStream(outStream); outStream.close(); commands.computeIfAbsent(cmd.scope(), k -> new TreeSet<>()).add(cmd.name()); getLog().info("Found command: " + cmd.scope() + ":" + cmd.name()); } catch (Exception e) { getLog().warn("Unable to write help for " + clazz.getName(), e);
File output = new File(targetFolder, cmd.scope() + "-" + cmd.name() + "." + commandSuffix); FileOutputStream outStream = new FileOutputStream(output); PrintStream out = new PrintStream(outStream); outStream.close(); commands.computeIfAbsent(cmd.scope(), k -> new TreeSet<>()).add(cmd.name()); getLog().info("Found command: " + cmd.scope() + ":" + cmd.name()); } catch (Exception e) { getLog().warn("Unable to write help for " + clazz.getName(), e);
Set<Option> optionsSet = new HashSet<Option>(options.keySet()); optionsSet.add(HelpOption.HELP); if (command != null && (command.description() != null || command.name() != null)) { out.println(INTENSITY_BOLD + "DESCRIPTION" + INTENSITY_NORMAL); out.print(" "); if (command.name() != null) { if (globalScope) { out.println(INTENSITY_BOLD + command.name() + INTENSITY_NORMAL); } else { out.println(command.scope() + ":" + INTENSITY_BOLD + command.name() + INTENSITY_NORMAL); if (command != null) { if (globalScope) { syntax.append(command.name()); } else { syntax.append(String.format("%s:%s", command.scope(), command.name()));
Set<Option> optionsSet = new HashSet<Option>(options.keySet()); optionsSet.add(HelpOption.HELP); if (command != null && (command.description() != null || command.name() != null)) { out.println(INTENSITY_BOLD + "DESCRIPTION" + INTENSITY_NORMAL); out.print(" "); if (command.name() != null) { if (globalScope) { out.println(INTENSITY_BOLD + command.name() + INTENSITY_NORMAL); } else { out.println(command.scope() + ":" + INTENSITY_BOLD + command.name() + INTENSITY_NORMAL); if (command != null) { if (globalScope) { syntax.append(command.name()); } else { syntax.append(String.format("%s:%s", command.scope(), command.name()));
String commandErrorSt = COLOR_RED + "Error executing command " + command.scope() + ":" + INTENSITY_BOLD + command.name() + INTENSITY_NORMAL + COLOR_DEFAULT + ": "; for (Object param : params) { if (HelpOption.HELP.name().equals(param.toString())) {
String commandErrorSt = COLOR_RED + "Error executing command " + command.scope() + ":" + INTENSITY_BOLD + command.name() + INTENSITY_NORMAL + COLOR_DEFAULT + ": "; for (Object param : params) { if (HelpOption.HELP.name().equals(param.toString())) {