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:
@@ -0,0 +1,53 @@
|
||||
#include "settings/SourceGroupSettingsJavaSonargraph.h"
|
||||
|
||||
SourceGroupSettingsJavaSonargraph::SourceGroupSettingsJavaSonargraph(const std::string& id, const ProjectSettings* projectSettings)
|
||||
: SourceGroupSettings(id, SOURCE_GROUP_JAVA_SONARGRAPH, projectSettings)
|
||||
{
|
||||
}
|
||||
|
||||
void SourceGroupSettingsJavaSonargraph::load(std::shared_ptr<const ConfigManager> config)
|
||||
{
|
||||
SourceGroupSettings::load(config);
|
||||
|
||||
const std::string key = s_keyPrefix + getId();
|
||||
|
||||
SourceGroupSettingsWithClasspath::load(config, key);
|
||||
SourceGroupSettingsWithSonargraphProjectPath::load(config, key);
|
||||
}
|
||||
|
||||
void SourceGroupSettingsJavaSonargraph::save(std::shared_ptr<ConfigManager> config)
|
||||
{
|
||||
SourceGroupSettings::save(config);
|
||||
|
||||
const std::string key = s_keyPrefix + getId();
|
||||
|
||||
SourceGroupSettingsWithClasspath::save(config, key);
|
||||
SourceGroupSettingsWithSonargraphProjectPath::save(config, key);
|
||||
}
|
||||
|
||||
bool SourceGroupSettingsJavaSonargraph::equals(std::shared_ptr<SourceGroupSettings> other) const
|
||||
{
|
||||
std::shared_ptr<SourceGroupSettingsJavaSonargraph> otherJavaSonargraph = std::dynamic_pointer_cast<SourceGroupSettingsJavaSonargraph>(other);
|
||||
|
||||
return (
|
||||
otherJavaSonargraph &&
|
||||
SourceGroupSettings::equals(other) &&
|
||||
SourceGroupSettingsWithClasspath::equals(otherJavaSonargraph) &&
|
||||
SourceGroupSettingsWithSonargraphProjectPath::equals(otherJavaSonargraph)
|
||||
);
|
||||
}
|
||||
|
||||
std::vector<std::string> SourceGroupSettingsJavaSonargraph::getAvailableLanguageStandards() const
|
||||
{
|
||||
return std::vector<std::string>{"1", "2", "3", "4", "5", "6", "7", "8"};
|
||||
}
|
||||
|
||||
std::string SourceGroupSettingsJavaSonargraph::getDefaultStandard() const
|
||||
{
|
||||
return "8";
|
||||
}
|
||||
|
||||
const ProjectSettings* SourceGroupSettingsJavaSonargraph::getProjectSettings() const
|
||||
{
|
||||
return m_projectSettings;
|
||||
}
|
||||
Reference in New Issue
Block a user