logic: source groups for project settings

* project can not have multiple source groups with different types
* language of a project is now inferred from source groups
* setting global NameHierarchy delimiter of first sourceGroup in project
* added project settings migrations for source groups
* Add Settings Migration classes (MoveKey, DeleteKey, Lambda)
* Update sample projects with migrations
* added method to config to retrieve sublevel key names
* implemented recursive removing of keys in settings
* moved project files out of top level
* removed solution parsing code as it is not used anymore

fortune cookie message = The secret of getting ahead is getting started.
This commit is contained in:
malte_langkabel
2017-03-31 16:11:37 +02:00
parent 25f3c4666a
commit 7b30ac18de
133 changed files with 2545 additions and 3386 deletions
+59
View File
@@ -0,0 +1,59 @@
#ifndef SOURCE_GROUP_SETTINGS_H
#define SOURCE_GROUP_SETTINGS_H
#include <memory>
#include <vector>
#include "settings/LanguageType.h"
#include "settings/ProjectSettings.h"
#include "settings/SourceGroupType.h"
class ProjectSettings;
class SourceGroupSettings
{
public:
SourceGroupSettings(const std::string& id, SourceGroupType type, const ProjectSettings* projectSettings);
virtual ~SourceGroupSettings();
virtual bool equals(std::shared_ptr<SourceGroupSettings> other) const;
std::string getId() const;
FilePath getProjectFileLocation() const;
FilePath makePathAbsolute(const FilePath& path) const;
virtual std::vector<std::string> getAvailableLanguageStandards() const = 0;
virtual SourceGroupType getType() const;
std::string getStandard() const;
void setStandard(const std::string& standard);
std::vector<FilePath> getSourcePaths() const;
std::vector<FilePath> getAbsoluteSourcePaths() const;
void setSourcePaths(const std::vector<FilePath>& sourcePaths);
std::vector<FilePath> getExcludePaths() const;
std::vector<FilePath> getAbsoluteExcludePaths() const;
void setExcludePaths(const std::vector<FilePath>& excludePaths);
std::vector<std::string> getSourceExtensions() const;
void setSourceExtensions(const std::vector<std::string>& sourceExtensions);
protected:
const ProjectSettings* m_projectSettings;
private:
virtual std::vector<std::string> getDefaultSourceExtensions() const = 0;
virtual std::string getDefaultStandard() const = 0;
const std::string m_id;
const SourceGroupType m_type;
std::string m_standard;
std::vector<FilePath> m_sourcePaths;
std::vector<FilePath> m_excludePaths;
std::vector<std::string> m_sourceExtensions;
};
#endif // SOURCE_GROUP_SETTINGS_H