|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.ui.WindowHolder
ucar.unidata.idv.IdvManager
ucar.unidata.idv.ArgsManager
public class ArgsManager
This manages the parsing and processing of the command line arguments to the IDV. If an IDV application needs to add custom command line arguments then you need to do:
IdvBase.doMakeArgsManager(String[]),
in your derived IntegratedDataViewer class.
parseArg(String,String[],int)
method.
| Field Summary | |
|---|---|
List |
argDisplayB64Xml
A list of the base 64 encoded in line display xml files |
List |
argXidvFiles
A list (String) of the bundle sources (files and/or urls) passed in on the command line. |
List |
b64Bundles
A list of the base 64 encoded in line bundles. |
protected List |
fileMappingFiles
Holds the set files arguments |
protected List |
fileMappingIds
Holds the set files arguments |
List |
installPlugins
List of plugins |
protected String |
jythonCode
Jython code that should be evaluated at startup time |
protected boolean |
listResources
Should we list out the resources for debugging |
protected boolean |
noGui
Should any guis be shown |
protected List |
persistentCommandLineArgs
This holds the command line arguments that should be written out in saved jnlp files (e.g., .properties) |
List |
plugins
List of plugins |
protected boolean |
printJnlpBundles
Shuold the embedded bundles in jnlp files be printed out |
static int |
RUNNABLE_MAX_TRIES
How many times to try to run the initial runnables |
List |
scriptingFiles
List of isl files |
String |
testArchive
The name of the test archive when we are in test archive writing mode |
String |
testDir
The name of the test directory when we are in test archive writing mode |
boolean |
testEval
Created when we see the -testeval command line argument. |
boolean |
testMode
Created when we see the -test command line argument. |
static String |
USAGE_MESSAGE
usage message |
| Fields inherited from class ucar.unidata.ui.WindowHolder |
|---|
contents, dialog, frame, window |
| Constructor Summary | |
|---|---|
ArgsManager(IntegratedDataViewer idv,
String[] args)
Create the manager with the given idv and command line arguments. |
|
| Method Summary | |
|---|---|
protected boolean |
checkArg(String arg,
String lookingFor,
String[] args,
int idx,
int howManyMore)
A utility method for checking the argument array. |
String |
getCollabHostName()
Get the host name for the collab server |
int |
getCollabPort()
Port for collab server |
boolean |
getDoCollabServer()
Should we start up a collab server |
String |
getFixedTimeString()
the fixed time index string |
List |
getInitCatalogs()
Method to return the initial catalogs |
boolean |
getIslInteractive()
Is isl interactive mode |
boolean |
getIsOffScreen()
running in offscreen mode |
boolean |
getNoGui()
Should we create any GUIs |
String[] |
getOriginalArgs()
Get the very original command line arguments. |
protected String |
getUsageMessage()
Return the command line usage message. |
protected void |
initDone()
Called by the IDV when its initialization is complete. |
static boolean |
isBundleFile(String name)
|
static boolean |
isDisplayXmlFile(String name)
Helper method to determine if the given filename is a display xml file |
static boolean |
isIslFile(String name)
Helper method to determine if the given filename is an isl file |
static boolean |
isJnlpFile(String name)
Helper method to determine if the given filename is a jnlp file |
static boolean |
isRbiFile(String name)
Helper method to determine if the given filename is a resource bundle file |
static boolean |
isXidvFile(String name)
Helper method to determine if the given filename is a xidv bundle file |
static boolean |
isZidvFile(String name)
is file a zidv file |
protected String |
msg(String arg,
String desc)
Utility to format the usage message line |
protected int |
parseArg(String arg,
String[] args,
int idx)
Check the argument given by the arg parameter. |
void |
parseArgs()
Parse the command line arguments. |
protected void |
parseArgs(String[] args)
Parse the given argument array. |
protected String[] |
preprocessArgs(String[] args)
Check for any .jnlp files in the command line. |
protected void |
processInitialBundles()
Gets called by the IDV to process the set of initial files, e.g., default bundles, command line bundles, jnlp files, etc. |
void |
processInstanceArgs(String[] args)
Process the command line argument we got passed form another instance of the idv |
void |
setIsOffScreen(boolean v)
set running in offscreen mode |
void |
usage(String err)
Print out the command line usage message and exit |
| Methods inherited from class ucar.unidata.ui.WindowHolder |
|---|
actionPerformed, close, doMakeContents, getContents, getDialog, getFrame, getWindow, getWindowTitle, isShowing, removeAll, setWindowTitle, shouldMakeDialog, show, show, showModal, toFront, windowIsClosing |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String USAGE_MESSAGE
public static final int RUNNABLE_MAX_TRIES
protected boolean listResources
protected List persistentCommandLineArgs
public boolean testMode
public boolean testEval
public String testArchive
public String testDir
protected boolean noGui
protected String jythonCode
public List argXidvFiles
public List argDisplayB64Xml
public List b64Bundles
public List plugins
public List installPlugins
protected boolean printJnlpBundles
public List scriptingFiles
protected List fileMappingIds
protected List fileMappingFiles
| Constructor Detail |
|---|
public ArgsManager(IntegratedDataViewer idv,
String[] args)
parseArgs()
idv - The IDVargs - Command line arguments| Method Detail |
|---|
public String[] getOriginalArgs()
public List getInitCatalogs()
protected void initDone()
public static boolean isDisplayXmlFile(String name)
name - The file name
public static boolean isXidvFile(String name)
name - The file name
public static boolean isBundleFile(String name)
public static boolean isIslFile(String name)
name - The file name
public static boolean isZidvFile(String name)
name - file
public static boolean isRbiFile(String name)
name - The file name
public static boolean isJnlpFile(String name)
name - The file name
public boolean getNoGui()
public void usage(String err)
err - The usage message
protected String msg(String arg,
String desc)
arg - argdesc - desc
public boolean getIslInteractive()
protected String getUsageMessage()
protected String[] preprocessArgs(String[] args)
args - The incoming argument array
public void parseArgs()
throws Exception
Exception - When something untoward happens
protected void parseArgs(String[] args)
throws Exception
args - The command line arguments
Exception - When something untoward happens
protected boolean checkArg(String arg,
String lookingFor,
String[] args,
int idx,
int howManyMore)
arg - The current value in the args arraylookingFor - The flag we are looking forargs - The full args arrayidx - The index of the current arghowManyMore - If arg==lookingFor then this is how many
more values the lookingFor flag requires.
If there are not that many left in the args
array then call usage and exit
protected int parseArg(String arg,
String[] args,
int idx)
throws Exception
arg - The current argument we are looking atargs - The full args arrayidx - The index into args that we are looking at
Exception - When something untoward happens
protected void processInitialBundles()
throws VisADException,
RemoteException
VisADException - When something untoward happens
RemoteException - When something untoward happenspublic void processInstanceArgs(String[] args)
args - command line argspublic String getCollabHostName()
public boolean getDoCollabServer()
public int getCollabPort()
public String getFixedTimeString()
public boolean getIsOffScreen()
public void setIsOffScreen(boolean v)
v - offscreen
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||