felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall (JIRA)" <j...@apache.org>
Subject [jira] Updated: (FELIX-2536) Gogo Shell should export org.apache.felix.gogo.options package
Date Tue, 11 Jan 2011 17:05:46 GMT

     [ https://issues.apache.org/jira/browse/FELIX-2536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Richard S. Hall updated FELIX-2536:
-----------------------------------

    Fix Version/s:     (was: gogo.runtime-0.8.0)
                   gogo.shell-0.10.0

> Gogo Shell should export org.apache.felix.gogo.options package
> --------------------------------------------------------------
>
>                 Key: FELIX-2536
>                 URL: https://issues.apache.org/jira/browse/FELIX-2536
>             Project: Felix
>          Issue Type: Improvement
>          Components: Gogo Shell
>            Reporter: David Savage
>            Priority: Minor
>             Fix For: gogo.shell-0.10.0
>
>
> The Gogo shell bundle includes a helpful utility class to handle Options parsing in the
gogo environment.
> org.apache.felix.gogo.options.Options
> final String[] usage = {
>             "test - test Options usage",
>             "  text before Usage: is displayed when usage() is called and no error has
occurred.",
>             "  so can be used as a simple help message.",
>             "",
>             "Usage: testOptions [OPTION]... PATTERN [FILES]...",
>             "  Output control: arbitary non-option text can be included.",
>             "  -? --help                show help",
>             "  -c --count=COUNT           show COUNT lines",
>             "  -h --no-filename         suppress the prefixing filename on output",
>             "  -q --quiet, --silent     suppress all normal output",
>             "     --binary-files=TYPE   assume that binary files are TYPE",
>             "                           TYPE is 'binary', 'text', or 'without-match'",
>             "  -I                       equivalent to --binary-files=without-match",
>             "  -d --directories=ACTION  how to handle directories (default=skip)",
>             "                           ACTION is 'read', 'recurse', or 'skip'",
>             "  -D --devices=ACTION      how to handle devices, FIFOs and sockets",
>             "                           ACTION is 'read' or 'skip'",
>             "  -R, -r --recursive       equivalent to --directories=recurse" };
>         Option opt = Options.compile(usage).parse(args);
>         if (opt.isSet("help")) {
>             opt.usage(); // includes text before Usage:
>             return;
>         }
>         if (opt.args().size() == 0)
>             throw opt.usageError("PATTERN not specified");
>         System.out.println(opt);
>         if (opt.isSet("count"))
>             System.out.println("count = " + opt.getNumber("count"));
>         System.out.println("--directories specified: " + opt.isSet("directories"));
>         System.out.println("directories=" + opt.get("directories"));
> However the package containing this class is not exported from this bundle so it cannot
be used by client code

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message