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:
@@ -0,0 +1,60 @@
|
||||
#ifndef PROJECT_H
|
||||
#define PROJECT_H
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#include "project/SourceGroup.h"
|
||||
|
||||
class FilePath;
|
||||
class PersistentStorage;
|
||||
class ProjectSettings;
|
||||
class StorageAccessProxy;
|
||||
|
||||
class Project
|
||||
{
|
||||
public:
|
||||
Project(std::shared_ptr<ProjectSettings> settings, StorageAccessProxy* storageAccessProxy);
|
||||
virtual ~Project();
|
||||
|
||||
bool refresh(bool forceRefresh);
|
||||
|
||||
FilePath getProjectSettingsFilePath() const;
|
||||
std::string getDescription() const;
|
||||
|
||||
bool settingsEqualExceptNameAndLocation(const ProjectSettings& otherSettings) const;
|
||||
void setStateSettingsUpdated();
|
||||
|
||||
private:
|
||||
enum ProjectStateType
|
||||
{
|
||||
PROJECT_STATE_NOT_LOADED,
|
||||
PROJECT_STATE_EMPTY,
|
||||
PROJECT_STATE_LOADED,
|
||||
PROJECT_STATE_OUTDATED,
|
||||
PROJECT_STATE_OUTVERSIONED,
|
||||
PROJECT_STATE_SETTINGS_UPDATED,
|
||||
PROJECT_STATE_NEEDS_MIGRATION
|
||||
};
|
||||
|
||||
Project(const Project&);
|
||||
|
||||
public: // todo: make private again
|
||||
void load();
|
||||
|
||||
private:
|
||||
bool requestIndex(bool forceRefresh, bool needsFullRefresh);
|
||||
|
||||
void buildIndex(const std::set<FilePath>& filesToClean, bool fullRefresh);
|
||||
|
||||
std::shared_ptr<ProjectSettings> m_settings;
|
||||
StorageAccessProxy* const m_storageAccessProxy;
|
||||
|
||||
ProjectStateType m_state;
|
||||
std::shared_ptr<PersistentStorage> m_storage;
|
||||
std::vector<std::shared_ptr<SourceGroup>> m_sourceGroups;
|
||||
};
|
||||
|
||||
#endif // PROJECT_H
|
||||
Reference in New Issue
Block a user