metaonly module xdc.tools.path.sg.Main

Command implementation

This graphical interactive tool displays the packages located along any specified package repository path. [ more ... ]
Configuration settings sourced in xdc/tools/path/sg/Main.xdc
var Main = xdc.useModule('xdc.tools.path.sg.Main');
module-wide config parameters
        '[--packagepath PATH]'
    ];
module-wide functions
    Main.exec// xs script entry point(Any args) returns Any
    Main.main// xs shell entry point(Any args) returns Any
per-instance config parameters
    var params = new Main.Params// Instance config-params object;
        params.pathArg// package path to scan for packages = String null;
per-instance functions
    inst.run// Underlying implementation of the command(Cmdr.Instance cmdr, String[] args) returns Any
 
USAGE
    xs xdc.tools.path.sg [--packagepath PATH]
DETAILS
This graphical interactive tool displays the packages located along any specified package repository path.
At startup, this tool shows the packages located along the current package path; i.e.,
      $XDCPATH;$XDCROOT/packages;^
where $XDCPATH is the value of the the user settable prefix of the package path, $XDCROOT is the installation directory of the XDC tools, and ^ is the repository of the package in the current working directory (if it exists). To specify a package path other than the current package path, use the --packagepath option. Only semicolon delimited canonical paths should be specifed as arguments with the --packagepath option. Environment variables such as $XDCROOT and special designators such as '^' should not be used.
BUGS
This tool scans all packages available along the current package path before displaying the user interface. So, a repository in the package path that contains a large number of sub-directories, such as '/', causes very long delays before the user interface is displayed.
While it is easy to see that you should not put '/' in the package path, it is less obvious that installing a package at '/' has the same effect.
 
config Main.usage  // module-wide

Usage for this command

Configuration settings
Main.usage = String[] [
    '[--packagepath PATH]'
];
 
 
Main.exec()  // module-wide

xs script entry point

Configuration settings
Main.exec(Any args) returns Any
 
DETAILS
This function is called from within other XDCscript scripts and performs the same operations as main() except that, rather than output the return value of inst.run(), this value is simply returned to the caller of exec().
 
Main.main()  // module-wide

xs shell entry point

Configuration settings
Main.main(Any args) returns Any
 
DETAILS
This function
  • creates a no-arg instance, inst, of the module inheriting this interface;
  • parses command line arguments placing all options in the config params of the inheriting module;
  • creates a xdc.tools.Cmdr instance, cmdr;
  • calls inst.run() with the cmdr and any command line command line arguments not parsed as options; and
  • outputs the return result from inst.run()
Instance Config Parameters

Configuration settings
var params = new Main.Params;
// Instance config-params object
    params.pathArg = String null;
    // package path to scan for packages
 
config Main.Params.pathArg  // instance

package path to scan for packages

Configuration settings
var params = new Main.Params;
  ...
params.pathArg = String null;
 
 
Main.run()  // instance

Underlying implementation of the command

Configuration settings
inst.run(Cmdr.Instance cmdr, String[] args) returns Any
 
DETAILS
Since this method is used to support both command line tools and other XDCscript scripts, it is important to avoid explicit termination of the JVM via java.lang.System.exit(); doing so precludes callers from handling failures.
Implementations should instead call
generated on Wed, 09 Apr 2014 00:37:51 GMT