CcConfiguration has got a complete rewrite.
Major modifications including:
Global configuration:
The global configuration is static and initialized on applicaton
start in StartUpJob.
Stripped project related fields IS_GLOBAL and CHECKER_WORKSPACE.
Project configuration:
Constist of Common and Project type keys. Common is that exitst in
Global, and Project related IS_GLOBAL and CHECKER_WORKSPACE which
only has meaning in project context.
Every project configuration is stored in CodeCheckerContext class. If not
in the store, it's created. There is a list of classes that needed
modification because before every time the configuration was needed
a new instance was created. This was replaced with getting the
stored config from CodeCheckerContext.
Now Initialized on first access with current Global data, if it's a
new project or read from persistent preferences.
Logic which handles changing between Global or Project level configuration
is different. Changing between them is now responsive. When set to
Global the Projects Common values are ignored and the Global
configuration is used. When Set to Project, the Common values are
used.
Project level configuration is first created at CodeCheckker Nature
addition. This ensures that every eligible project has a
configuration stored as persistent preferences, and a directory
validation is also performed here.
Both type of configuration is validated when read from persistent
storage. If it's contains invalid or missing keys, it restores them with
default values from the default configuration.
The keys used in the preferences, are the actual enum keys stringified,
instead of strings associated with keys.
The CodeCheckEnvironmentChecker is now an utility class used by
CcConfiguration.
There is an enum poliformism introduced to help differentiate between
project and global keys. And an utility method is introduced to them
that returns if a config key is in that enum.
There is a minor Gui improvement regarding these changes:
The project level config input fields are greyed and disabled when
Global config is used.
Form resizing works when parent window is resized.
Proper border around input fields.
package-info.java was introduced according to chexkstyle rules.
CcConfiguration has got a complete rewrite. Major modifications including:
Global configuration:
Project configuration:
Both type of configuration is validated when read from persistent storage. If it's contains invalid or missing keys, it restores them with default values from the default configuration.
The keys used in the preferences, are the actual enum keys stringified, instead of strings associated with keys.
The CodeCheckEnvironmentChecker is now an utility class used by CcConfiguration.
There is an enum poliformism introduced to help differentiate between project and global keys. And an utility method is introduced to them that returns if a config key is in that enum.
There is a minor Gui improvement regarding these changes:
package-info.java was introduced according to chexkstyle rules.