Files
Sourcetrail/src/lib/settings/SourceGroupSettings.h
T
mlangkabel 7b735cfd17 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
2018-05-18 16:07:57 +02:00

65 lines
1.6 KiB
C++

#ifndef SOURCE_GROUP_SETTINGS_H
#define SOURCE_GROUP_SETTINGS_H
#include <memory>
#include <vector>
#include "settings/LanguageType.h"
#include "settings/SourceGroupStatusType.h"
#include "settings/SourceGroupType.h"
class ConfigManager;
class FilePath;
class ProjectSettings;
class SourceGroupSettings
{
public:
static const size_t s_version;
static const std::string s_keyPrefix;
SourceGroupSettings(const std::string& id, SourceGroupType type, const ProjectSettings* projectSettings);
virtual ~SourceGroupSettings() = default;
virtual void load(std::shared_ptr<const ConfigManager> config);
virtual void save(std::shared_ptr<ConfigManager> config);
virtual bool equals(std::shared_ptr<SourceGroupSettings> other) const;
std::string getId() const;
void setId(const std::string& id);
SourceGroupType getType() const;
LanguageType getLanguage() const;
std::string getName() const;
void setName(const std::string& name);
SourceGroupStatusType getStatus() const;
void setStatus(SourceGroupStatusType status);
FilePath getProjectDirectoryPath() const;
FilePath makePathExpandedAndAbsolute(const FilePath& path) const;
std::vector<FilePath> makePathsExpandedAndAbsolute(const std::vector<FilePath>& paths) const;
virtual std::vector<std::string> getAvailableLanguageStandards() const = 0;
std::string getStandard() const;
void setStandard(const std::string& standard);
protected:
const ProjectSettings* m_projectSettings;
private:
virtual std::string getDefaultStandard() const = 0;
std::string m_id;
std::string m_name;
const SourceGroupType m_type;
SourceGroupStatusType m_status;
std::string m_standard;
};
#endif // SOURCE_GROUP_SETTINGS_H