Files
Sourcetrail/src/lib/settings/SourceGroupSettingsJavaSonargraph.cpp
T
Eberhard Graether 6d5a3c047d logic: Added SourceGroupCustomCommand to use with SourcetrailDB binaries
* Added new Source Group type SourceGroupCustomCommand to UI and ProjectSettings
* The Source Group executes a specified command on every source file
* The variables $SOURCE_PATH, $PROJECT_PATH, $DB_PATH, $STORAGE_VERSION can be passed
* The commands are executed after all other source groups finished indexing
* The command is executed with working directory set to project directory
* Errors during command execution are shown as status update and in the Status View
* SourceGroupCustomCommand cannot be partially cleared, when one file needs clearing the project must be fully re-indexed
2018-12-11 14:05:26 +01:00

47 lines
1.6 KiB
C++

#include "SourceGroupSettingsJavaSonargraph.h"
SourceGroupSettingsJavaSonargraph::SourceGroupSettingsJavaSonargraph(const std::string& id, const ProjectSettings* projectSettings)
: SourceGroupSettings(id, SOURCE_GROUP_JAVA_SONARGRAPH, projectSettings)
{
}
std::shared_ptr<SourceGroupSettings> SourceGroupSettingsJavaSonargraph::createCopy() const
{
return std::make_shared<SourceGroupSettingsJavaSonargraph>(*this);
}
void SourceGroupSettingsJavaSonargraph::load(std::shared_ptr<const ConfigManager> config)
{
SourceGroupSettings::load(config);
const std::string key = s_keyPrefix + getId();
SourceGroupSettingsWithClasspath::load(config, key);
SourceGroupSettingsWithJavaStandard::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);
SourceGroupSettingsWithJavaStandard::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) &&
SourceGroupSettingsWithJavaStandard::equals(otherJavaSonargraph) &&
SourceGroupSettingsWithSonargraphProjectPath::equals(otherJavaSonargraph)
);
}