Files
Sourcetrail/src/lib/settings/ProjectSettings.h
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

59 lines
1.6 KiB
C++

#ifndef PROJECT_SETTINGS_H
#define PROJECT_SETTINGS_H
#include <memory>
#include <vector>
#include "SettingsMigrator.h"
#include "LanguageType.h"
#include "Settings.h"
class SourceGroupSettings;
class ProjectSettings
: public Settings
{
public:
static const std::wstring PROJECT_FILE_EXTENSION;
static const std::wstring BOOKMARK_DB_FILE_EXTENSION;
static const std::wstring INDEX_DB_FILE_EXTENSION;
static const std::wstring TEMP_INDEX_DB_FILE_EXTENSION;
static const size_t VERSION;
static LanguageType getLanguageOfProject(const FilePath& filePath);
ProjectSettings();
ProjectSettings(const FilePath& projectFilePath);
virtual ~ProjectSettings();
bool equalsExceptNameAndLocation(const ProjectSettings& other) const;
bool needMigration() const;
void migrate();
bool reload();
FilePath getProjectFilePath() const;
void setProjectFilePath(std::wstring projectName, const FilePath& projectFileLocation);
FilePath getDBFilePath() const;
FilePath getTempDBFilePath() const;
FilePath getBookmarkDBFilePath() const;
std::wstring getProjectName() const;
FilePath getProjectDirectoryPath() const;
std::string getDescription() const;
std::vector<std::shared_ptr<SourceGroupSettings>> getAllSourceGroupSettings() const;
void setAllSourceGroupSettings(const std::vector<std::shared_ptr<SourceGroupSettings>>& allSettings);
std::vector<FilePath> makePathsExpandedAndAbsolute(const std::vector<FilePath>& paths) const;
FilePath makePathExpandedAndAbsolute(const FilePath& path) const;
private:
SettingsMigrator getMigrations() const;
};
#endif // PROJECT_SETTINGS_H