Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350853

Summary: [Gogo] The VSH command should be provided to gogo using the speced service properties
Product: [RT] Virgo Reporter: Chris Frost <eclipse>
Component: unknownAssignee: Glyn Normington <glyn.normington>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: b.kapukaranov, glyn.normington, l.kirchev
Version: 3.0.0.M06Flags: 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 CLA 2011-06-30 11:21:00 EDT
As per the title, when you type help you don't see the vsh command as it is not provided with a service property with the appropriate scope and alias. 


P.S.
The vsh command also provides some features already in gogo?
Comment 1 Glyn Normington CLA 2011-07-19 07:23:40 EDT
Deferring to next release as too disruptive to implement at this stage of 3.0.
Comment 2 Glyn Normington CLA 2011-10-26 04:23:12 EDT
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
Comment 3 Glyn Normington CLA 2011-11-10 07:01:20 EST
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.
Comment 4 Glyn Normington CLA 2011-11-10 07:04:11 EST
Implemented in kernel commit 6f28924.
Comment 5 Glyn Normington CLA 2011-11-10 07:17:14 EST
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.
Comment 6 Glyn Normington CLA 2011-11-11 05:33:27 EST
Documented in commit 33c74c7.
Comment 7 Glyn Normington CLA 2011-11-11 05:34:56 EST
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>