logic: added project setup support for Sonargraph projects (Java and CMake-JSON modules supported)

* added classes for loading a Sonargraph project
* added Sonargraph options to project setup wizard
* added test for generating indexer commands from Sonargraph modules
* fixed sqlite storage crashing in constructor when parent directory of provided path does not exist
* removed unused FileRegister from Java indexing
* removed unused info from IndexerCommandJava
* refactored loading and saving of SourceGroupSettings
* extracted sourcepaths settings to own class that can be re-used
* merged CDB wizard contentents for source file and indexed paths
* unified wizard content for sonargraph project path
* removed include filters from default source groups
* extracted generation of RefreshInfo from Project to RefreshInfoGenerator
* added tests for RefreshInfoGenerator
* added language and standard selection to sonargraph project setup
* added auto-detection for indexed header paths of sonargraph cmake json modules
* Sonargraph::Project can enable/disable support for specific modules
* warn if sonargraph project contains no matching modules
* indexed headers can be detected from sonargraph project
This commit is contained in:
mlangkabel
2018-05-18 16:07:57 +02:00
parent e55ae5ba31
commit 7b735cfd17
164 changed files with 24770 additions and 1684 deletions
@@ -1,5 +1,8 @@
#include "settings/SourceGroupSettingsJavaMaven.h"
#include "settings/ProjectSettings.h"
#include "utility/ConfigManager.h"
SourceGroupSettingsJavaMaven::SourceGroupSettingsJavaMaven(const std::string& id, const ProjectSettings* projectSettings)
: SourceGroupSettingsJava(id, SOURCE_GROUP_JAVA_MAVEN, projectSettings)
, m_mavenProjectFilePath(FilePath())
@@ -8,19 +11,15 @@ SourceGroupSettingsJavaMaven::SourceGroupSettingsJavaMaven(const std::string& id
{
}
SourceGroupSettingsJavaMaven::~SourceGroupSettingsJavaMaven()
{
}
void SourceGroupSettingsJavaMaven::load(std::shared_ptr<const ConfigManager> config)
{
SourceGroupSettingsJava::load(config);
const std::string key = s_keyPrefix + getId();
setMavenProjectFilePath(FilePath(getValue<std::wstring>(key + "/maven/project_file_path", L"", config)));
setMavenDependenciesDirectory(FilePath(getValue<std::wstring>(key + "/maven/dependencies_directory", L"", config)));
setShouldIndexMavenTests(getValue<bool>(key + "/maven/should_index_tests", false, config));
setMavenProjectFilePath(config->getValueOrDefault(key + "/maven/project_file_path", FilePath(L"")));
setMavenDependenciesDirectory(config->getValueOrDefault(key + "/maven/dependencies_directory", FilePath(L"")));
setShouldIndexMavenTests(config->getValueOrDefault(key + "/maven/should_index_tests", false));
}
void SourceGroupSettingsJavaMaven::save(std::shared_ptr<ConfigManager> config)
@@ -29,9 +28,9 @@ void SourceGroupSettingsJavaMaven::save(std::shared_ptr<ConfigManager> config)
const std::string key = s_keyPrefix + getId();
setValue(key + "/maven/project_file_path", getMavenProjectFilePath().wstr(), config);
setValue(key + "/maven/dependencies_directory", getMavenDependenciesDirectory().wstr(), config);
setValue(key + "/maven/should_index_tests", getShouldIndexMavenTests(), config);
config->setValue(key + "/maven/project_file_path", getMavenProjectFilePath().wstr());
config->setValue(key + "/maven/dependencies_directory", getMavenDependenciesDirectory().wstr());
config->setValue(key + "/maven/should_index_tests", getShouldIndexMavenTests());
}
bool SourceGroupSettingsJavaMaven::equals(std::shared_ptr<SourceGroupSettings> other) const