Files
Sourcetrail/src/lib/settings/SourceGroupSettingsJavaEmpty.cpp
T
mlangkabel 08ab75f262 logic: refactored QtProjectWizzard to remove duplicate definition of contents shown for setup and summary
* also added current page count (e.g. 1/3) to project setup
* moved the code for copying a source group to the settings classes so that the wizzard doesn't need to know which source groups may be there anymore.
2018-06-25 16:00:20 +02:00

49 lines
1.5 KiB
C++

#include "settings/SourceGroupSettingsJavaEmpty.h"
SourceGroupSettingsJavaEmpty::SourceGroupSettingsJavaEmpty(const std::string& id, const ProjectSettings* projectSettings)
: SourceGroupSettingsJava(id, SOURCE_GROUP_JAVA_EMPTY, projectSettings)
{
}
std::shared_ptr<SourceGroupSettings> SourceGroupSettingsJavaEmpty::createCopy() const
{
return std::make_shared<SourceGroupSettingsJavaEmpty>(*this);
}
void SourceGroupSettingsJavaEmpty::load(std::shared_ptr<const ConfigManager> config)
{
SourceGroupSettings::load(config);
const std::string key = s_keyPrefix + getId();
SourceGroupSettingsWithSourcePaths::load(config, key);
SourceGroupSettingsWithClasspath::load(config, key);
}
void SourceGroupSettingsJavaEmpty::save(std::shared_ptr<ConfigManager> config)
{
SourceGroupSettings::save(config);
const std::string key = s_keyPrefix + getId();
SourceGroupSettingsWithSourcePaths::save(config, key);
SourceGroupSettingsWithClasspath::save(config, key);
}
bool SourceGroupSettingsJavaEmpty::equals(std::shared_ptr<SourceGroupSettings> other) const
{
std::shared_ptr<SourceGroupSettingsJavaEmpty> otherJava = std::dynamic_pointer_cast<SourceGroupSettingsJavaEmpty>(other);
return (
otherJava &&
SourceGroupSettingsJava::equals(other) &&
SourceGroupSettingsWithSourcePaths::equals(otherJava) &&
SourceGroupSettingsWithClasspath::equals(otherJava)
);
}
const ProjectSettings* SourceGroupSettingsJavaEmpty::getProjectSettings() const
{
return m_projectSettings;
}