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/SourceGroupSettingsJavaGradle.h"
#include "settings/ProjectSettings.h"
#include "utility/ConfigManager.h"
SourceGroupSettingsJavaGradle::SourceGroupSettingsJavaGradle(const std::string& id, const ProjectSettings* projectSettings)
: SourceGroupSettingsJava(id, SOURCE_GROUP_JAVA_GRADLE, projectSettings)
, m_gradleProjectFilePath(FilePath())
@@ -8,19 +11,15 @@ SourceGroupSettingsJavaGradle::SourceGroupSettingsJavaGradle(const std::string&
{
}
SourceGroupSettingsJavaGradle::~SourceGroupSettingsJavaGradle()
{
}
void SourceGroupSettingsJavaGradle::load(std::shared_ptr<const ConfigManager> config)
{
SourceGroupSettingsJava::load(config);
const std::string key = s_keyPrefix + getId();
setGradleProjectFilePath(FilePath(getValue<std::wstring>(key + "/gradle/project_file_path", L"", config)));
setGradleDependenciesDirectory(FilePath(getValue<std::wstring>(key + "/gradle/dependencies_directory", L"", config)));
setShouldIndexGradleTests(getValue<bool>(key + "/gradle/should_index_tests", false, config));
setGradleProjectFilePath(config->getValueOrDefault(key + "/gradle/project_file_path", FilePath(L"")));
setGradleDependenciesDirectory(config->getValueOrDefault(key + "/gradle/dependencies_directory", FilePath(L"")));
setShouldIndexGradleTests(config->getValueOrDefault(key + "/gradle/should_index_tests", false));
}
void SourceGroupSettingsJavaGradle::save(std::shared_ptr<ConfigManager> config)
@@ -29,9 +28,9 @@ void SourceGroupSettingsJavaGradle::save(std::shared_ptr<ConfigManager> config)
const std::string key = s_keyPrefix + getId();
setValue(key + "/gradle/project_file_path", getGradleProjectFilePath().wstr(), config);
setValue(key + "/gradle/dependencies_directory", getGradleDependenciesDirectory().wstr(), config);
setValue(key + "/gradle/should_index_tests", getShouldIndexGradleTests(), config);
config->setValue(key + "/gradle/project_file_path", getGradleProjectFilePath().wstr());
config->setValue(key + "/gradle/dependencies_directory", getGradleDependenciesDirectory().wstr());
config->setValue(key + "/gradle/should_index_tests", getShouldIndexGradleTests());
}
bool SourceGroupSettingsJavaGradle::equals(std::shared_ptr<SourceGroupSettings> other) const