[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20050415: IDV - setting PATHS for the IDV
- Subject: 20050415: IDV - setting PATHS for the IDV
- Date: Fri, 15 Apr 2005 13:11:10 -0600
Inquiry: How do you set the USERPATH APPPATH etc for the IDV xml resource files?
Hi Stu,
The IdvResourceManager does this:
/**
* Initialize the macro values
*
*/
private void initResourceMacros() {
macroNames = new String[] {
"%USERPATH%", "%SITEPATH%", "%IDVPATH%", "%DATAPATH%",
"%APPPATH%", "%VERSION%", "%VERSION.MAJOR%", "%VERSION.MINOR%",
"%VERSION.REVISION%"
};
macroValues = new String[] {
getUserPath(), getSitePath(), getIdvResourcePath(),
getDataResourcePath(), getAppResourcePath(),
getStateManager().getVersion(),
getStateManager().getVersionMajor(),
getStateManager().getVersionMinor(),
getStateManager().getVersionRevision()
};
}
For the app path it looks to see if there is an apppath property if not
it uses the package of the main IDV class.
For user path it calls:
getStore().getUserDirectory().getPath();
Which either looks at the command line -userpath argument or defaults to
be ~/.metapps/<Main IDV Class Name>
Site path is either command line argument or from the User Preferences gui
You can change all of these by overwriting the appropriate
IdvResourceManager method in a GeonResourceManager
class.
-Jeff