| Summary: | [Gogo] The VSH command should be provided to gogo using the speced service properties | ||
|---|---|---|---|
| Product: | [RT] Virgo | Reporter: | Chris Frost <eclipse> |
| Component: | unknown | Assignee: | Glyn Normington <glyn.normington> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | b.kapukaranov, glyn.normington, l.kirchev |
| Version: | 3.0.0.M06 | Flags: | glyn.normington:
documentation+
|
| Target Milestone: | 3.5.0.RELEASE | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 363295 | ||
|
Description
Chris Frost
Deferring to next release as too disruptive to implement at this stage of 3.0. Some notes on using annotations to provide help in Gogo:
On 25 Oct 2011, at 16:44, Richard S. Hall wrote:
The JavaDoc for Parameter is the important one, otherwise there is only Descriptor, which just sets a description. A Parameter can have multiple names (i.e., aliases) and can have a default value for when it is present or absent.
So, a boolean flag, for example, might have a presentValue of true and an absentValue of false, e.g.:
foo:command -flag
This sets the "flag" parameter to true (assuming that's how you defined the presentValue). Meanwhile, an argument might have a default absentValue, but will have no presentValue which means that it must be specified on the command line, e.g.:
foo:command -arg blah
This sets the "arg" parameter to "blah", whereas if it weren't specified it would be assigned the absentValue instead.
For the most part, I've only ever used flags as parameters. You can see some examples here:
http://svn.apache.org/repos/asf/felix/releases/org.apache.felix.gogo.command-0.12.0/src/main/java/org/apache/felix/gogo/command/Basic.java
Rased https://issues.apache.org/jira/browse/FELIX-3214 to cover the present need to set a property such as gosh.args=--nointeractive to prevent the Gogo shell bundle shutting down the whole framework by default. Implemented in kernel commit 6f28924. Raised https://issues.apache.org/jira/browse/FELIX-3215 to avoid the need to work around poor parameter help indentation. Raised https://issues.apache.org/jira/browse/FELIX-3216 about the current restriction that Gogo commands cannot be Java language keywords. For this reason we had to rename the "package" command to "packages" which really is a misnomer. Documented in commit 33c74c7. Example of use:
osgi> help
equinox:b
...
vsh:bundle
vsh:config
vsh:install
vsh:packages
vsh:par
vsh:plan
vsh:service
vsh:shutdown
osgi> help vsh:bundle
bundle - examine or manage a bundle artifact
scope: vsh
parameters:
String operation (examine|diag|headers|start|stop|refresh|uninstall)
long bundle id
bundle - examine or manage a bundle artifact
scope: vsh
parameters:
String operation (examine|diag|headers|start|stop|refresh|uninstall)
String bundle symbolic name
String bundle version
bundle - list bundle artifacts
scope: vsh
parameters:
String operation (list)
osgi>
|