ATTENTION: This commit got a lot of white space modification due to checkstyle. Please use ignore whitespace in diff settings,
This resolves #119
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.
Added clang++ to the default compiler list.
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 no instantiation on every preferences page
modification, instead a static method is called to perform the
CodeChecker binary validation.
The congfig enum is reworked. The String value associated with the actual
values, respresenst the default value of that key. And the default
config map is constructed here.
A utility method is introduced to that checks if a String is a valid
enum value, and returns that config key if true. Common and project related
enum specializations are implemented by range masking. There is a helper
method for easier logging of modified keys.
Unix path generation is replaced with a platform independent solution.
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.
ATTENTION: This commit got a lot of white space modification due to checkstyle. Please use ignore whitespace in diff settings,
This resolves #119
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.
Added clang++ to the default compiler list.
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 no instantiation on every preferences page modification, instead a static method is called to perform the CodeChecker binary validation.
The congfig enum is reworked. The String value associated with the actual values, respresenst the default value of that key. And the default config map is constructed here. A utility method is introduced to that checks if a String is a valid enum value, and returns that config key if true. Common and project related enum specializations are implemented by range masking. There is a helper method for easier logging of modified keys.
Unix path generation is replaced with a platform independent solution.
There is a minor Gui improvement regarding these changes:
package-info.java was introduced according to chexkstyle rules.