Ericsson / CodeCheckerEclipsePlugin

This is an Eclipse plugin that shows C/C++ static analysis results found by Clang Static Analyzer and Clang Tidy
Eclipse Public License 1.0
32 stars 13 forks source link

Complete refactor of configuration. #140

Closed vodorok closed 5 years ago

vodorok commented 5 years ago

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.