Examples of scope()


Examples of org.apache.felix.gogo.commands.Command.scope()

                out.println(command.description());
                out.println("    </para>");
                out.println("  </section>");

                StringBuffer syntax = new StringBuffer();
                syntax.append(String.format("%s:%s", command.scope(), command.name()));
                if (options.size() > 0) {
                    syntax.append(" [options]");
                }
                if (arguments.size() > 0) {
                    syntax.append(' ');
View Full Code Here

Examples of org.apache.karaf.shell.api.action.Command.scope()

    public ArgumentCompleter(ActionCommand command, boolean scoped) {
        this.command = command;
        Class<?> actionClass = command.getActionClass();
        // Command name completer
        Command cmd = actionClass.getAnnotation(Command.class);
        String[] names = scoped || Session.SCOPE_GLOBAL.equals(cmd.scope()) ? new String[] { cmd.name() } : new String[] { cmd.name(), cmd.scope() + ":" + cmd.name() };
        commandCompleter = new StringsCompleter(names);
        // Build options completer
        for (Class<?> type = actionClass; type != null; type = type.getSuperclass()) {
            for (Field field : type.getDeclaredFields()) {
                Option option = field.getAnnotation(Option.class);
View Full Code Here

Examples of org.apache.karaf.shell.commands.Command.scope()

        });
        Set<Option> options = new HashSet<Option>(optionsMap.keySet());
        if (includeHelpOption)
            options.add(HelpOption.HELP);

        out.println("h1. " + command.scope() + ":" + command.name());
        out.println();

        out.println("h2. Description");
        out.println(command.description());
        out.println();
View Full Code Here

Examples of org.apache.karaf.shell.commands.Command.scope()

        out.println("h2. Description");
        out.println(command.description());
        out.println();

        StringBuffer syntax = new StringBuffer();
        syntax.append(String.format("%s:%s", command.scope(), command.name()));
        if (options.size() > 0) {
            syntax.append(" \\[options\\]");
        }
        if (arguments.size() > 0) {
            syntax.append(' ');
View Full Code Here

Examples of org.apache.karaf.shell.commands.Command.scope()

        Set<Option> options = new HashSet<Option>(optionsMap.keySet());
        if (includeHelpOption)
            options.add(HelpOption.HELP);

        out.println("<section>");
        out.println("  <title>" + command.scope() + ":" + command.name() + "</title>");
        out.println("  <section>");
        out.println("    <title>Description</title>");
        out.println("    <para>");
        out.println(command.description());
        out.println("    </para>");
View Full Code Here

Examples of org.apache.karaf.shell.commands.Command.scope()

        out.println(command.description());
        out.println("    </para>");
        out.println("  </section>");

        StringBuffer syntax = new StringBuffer();
        syntax.append(String.format("%s:%s", command.scope(), command.name()));
        if (options.size() > 0) {
            syntax.append(" [options]");
        }
        if (arguments.size() > 0) {
            syntax.append(' ');
View Full Code Here

Examples of org.apache.karaf.shell.commands.Command.scope()

                    Action action = (Action) clazz.newInstance();
                    ActionMetaData meta = new ActionMetaDataFactory().create(action.getClass());
                    Command cmd = meta.getCommand();

                    // skip the *-help command
                    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);
                    helpPrinter.printHelp(action, meta, out, includeHelpOption);
View Full Code Here

Examples of org.apache.karaf.shell.commands.Command.scope()

                    Command cmd = meta.getCommand();

                    // skip the *-help command
                    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);
                    helpPrinter.printHelp(action, meta, out, includeHelpOption);
                    out.close();
                    outStream.close();
View Full Code Here

Examples of org.apache.karaf.shell.commands.Command.scope()

                    PrintStream out = new PrintStream(outStream);
                    helpPrinter.printHelp(action, meta, out, includeHelpOption);
                    out.close();
                    outStream.close();

                    Set<String> cmds = commands.get(cmd.scope());
                    if (cmds == null) {
                        cmds = new TreeSet<String>();
                        commands.put(cmd.scope(), cmds);
                    }
                    cmds.add(cmd.name());
View Full Code Here

Examples of org.apache.karaf.shell.commands.Command.scope()

                    outStream.close();

                    Set<String> cmds = commands.get(cmd.scope());
                    if (cmds == null) {
                        cmds = new TreeSet<String>();
                        commands.put(cmd.scope(), cmds);
                    }
                    cmds.add(cmd.name());
                    getLog().info("Found command: " + cmd.scope() + ":" + cmd.name());
                } catch (Exception e) {
                    getLog().warn("Unable to write help for " + clazz.getName(), e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.