Greg or Mike,
I'm trying to use the ConfigurationHandler in configuration.xml
to read in settings from a configuration file I have created.
However, it turns out that if you have already used the
configuration handler for something else (like reading
Configuration.xml for the STS), it will not read in a new file, but
keeps the settings from the first file it read.
This is because all of the mapGlobalSettings, bConfiguring, and
bConfigured private members are all static - which means they will be
shared by all instances of this class. So the first time bConfigured
gets set to true, you cannot use ANY instance of the
ConfigurationHandler class to read in other configuration files - or to
reread your original configuration file.
This is sort of how a singleton might behave - you only want to
configure once, from one file, ever - but that strikes me as a very
strange behavior. Did we intend this behavior? If so, that really
limits its usefulness in allowing me to read in different configuration
files at different times. If not, the solution is easy - just don't
make any of those member variables private.
Please advise - I need to know what to do fairly quickly. If we
keep the variables static, I will have to use some other technology -
or roll my own - to do configuration - something I really would prefer
to avoid doing.
Thanks,
Daniel
_______________________________________________
higgins-dev mailing list
higgins-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/higgins-dev