Project Settings

Currently all properties on the Prism settings dialog are saved in Java properties file format to ~/.prism. The properties are not, however, dealt with using Java's standard System.getProperty(String) and System.setProperty(String) methods. Instead PrismSettigs uses it's own parser (wtf!?) to load/save files. Properties must be defined before use in public static final variables in PrismSettings. These variables store metadata about the name of the property, description, and also type so that property types (class) can be checked. As such, properties are accessed using getString, getBoolean etc. methods.

What does this mean:

  • adding new properties is a pain;
  • default and acceptable values must be statically defined at compile time;
  • moving properties to the project file will be a pain as the property access API will probably need considerable revision.

How we proceed:

  • one class (PrismSettings) should remain responsible for global settings management;
  • it should be possible to retrofit PrismSettings with support for project/model specific settings - whether we do this here or elsewhere needs consideration;
  • we could consider re-writing PrismSettings to use XML since a lot of commented out code appears to be for this purpose - again something to consider.

I'll think more about these things when I'm awake tomorrow...

============================================================================

-- ChrisPaton - 10 Oct 2006

Topic revision: r3 - 10 Oct 2006 - 20:15:29 - ChrisPaton
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies