@Override public String getScope() { return actionClass.getAnnotation(Command.class).scope(); }
@Override public String getScope() { return actionClass.getAnnotation(Command.class).scope(); }
if (cmd.scope().equals("*")) continue; 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);
if (cmd.scope().equals("*")) continue; 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);
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())) { int termWidth = session.getTerminal() != null ? session.getTerminal().getWidth() : 80; termWidth = termWidth == 0 ? 80 : termWidth; boolean globalScope = NameScoping.isGlobalScope(session, command.scope()); printUsage(action, options, arguments, System.out, globalScope, termWidth); return false;
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())) { int termWidth = session.getTerminal() != null ? session.getTerminal().getWidth() : 80; termWidth = termWidth == 0 ? 80 : termWidth; boolean globalScope = NameScoping.isGlobalScope(session, command.scope()); printUsage(action, options, arguments, System.out, globalScope, termWidth); return false;