ui: Extended wizzard with simple setup and vs solution parsing

* removed blurry coati background
* added language selection to project type window
* search for headers in project paths option as part of simple setup
* show popup containing list of all analyzed symbols
* show build file path in summary and allow refreshing
* only force refresh after editing project and something changed
This commit is contained in:
Eberhard Graether
2016-02-17 13:32:21 +01:00
parent b7bb1349f2
commit a4c6cebce6
40 changed files with 1019 additions and 573 deletions
+51
View File
@@ -1,5 +1,7 @@
#include "settings/ProjectSettings.h"
#include "utility/utility.h"
std::vector<std::string> ProjectSettings::getDefaultHeaderExtensions()
{
std::vector<std::string> defaultValues;
@@ -38,6 +40,20 @@ ProjectSettings::~ProjectSettings()
{
}
bool ProjectSettings::operator==(const ProjectSettings& other) const
{
return
getFilePath() == other.getFilePath() &&
getLanguage() == other.getLanguage() &&
getStandard() == other.getStandard() &&
getVisualStudioSolutionPath() == other.getVisualStudioSolutionPath() &&
getCompilationDatabasePath() == other.getCompilationDatabasePath() &&
getUseSourcePathsForHeaderSearch() == other.getUseSourcePathsForHeaderSearch() &&
utility::isPermutation<FilePath>(getSourcePaths(), other.getSourcePaths()) &&
utility::isPermutation<FilePath>(getHeaderSearchPaths(), other.getHeaderSearchPaths()) &&
utility::isPermutation<FilePath>(getFrameworkSearchPaths(), other.getFrameworkSearchPaths());
}
void ProjectSettings::save(const FilePath& filePath)
{
m_projectName = "";
@@ -126,6 +142,41 @@ bool ProjectSettings::setSourceExtensions(const std::vector<std::string> &source
return setValues("source/extensions/source_extensions", sourceExtensions);
}
bool ProjectSettings::isUseSourcePathsForHeaderSearchDefined() const
{
return isValueDefined("source/use_source_paths_for_header_search");
}
bool ProjectSettings::getUseSourcePathsForHeaderSearch() const
{
return getValue<bool>("source/use_source_paths_for_header_search", false);
}
bool ProjectSettings::setUseSourcePathsForHeaderSearch(bool useSourcePathsForHeaderSearch)
{
return setValue<bool>("source/use_source_paths_for_header_search", useSourcePathsForHeaderSearch);
}
FilePath ProjectSettings::getVisualStudioSolutionPath() const
{
return FilePath(getValue<std::string>("source/build_file_path/vs_solution_path", ""));
}
bool ProjectSettings::setVisualStudioSolutionPath(const FilePath& visualStudioSolutionPath)
{
return setValue<std::string>("source/build_file_path/vs_solution_path", visualStudioSolutionPath.str());
}
FilePath ProjectSettings::getCompilationDatabasePath() const
{
return FilePath(getValue<std::string>("source/build_file_path/compilation_db_path", ""));
}
bool ProjectSettings::setCompilationDatabasePath(const FilePath& compilationDatabasePath)
{
return setValue<std::string>("source/build_file_path/compilation_db_path", compilationDatabasePath.str());
}
std::string ProjectSettings::getDescription() const
{
return getValue<std::string>("info/description", "");
+15 -4
View File
@@ -17,10 +17,9 @@ public:
ProjectSettings();
~ProjectSettings();
virtual void save(const FilePath& filePath);
bool operator==(const ProjectSettings& other) const;
// info
std::string getDescription() const;
virtual void save(const FilePath& filePath);
// language settings
std::string getLanguage() const;
@@ -41,13 +40,25 @@ public:
std::vector<std::string> getCompilerFlags() const;
// extensions
std::vector<std::string> getHeaderExtensions() const;
std::vector<std::string> getSourceExtensions() const;
bool setHeaderExtensions(const std::vector<std::string>& headerExtensions);
bool setSourceExtensions(const std::vector<std::string>& sourceExtensions);
bool isUseSourcePathsForHeaderSearchDefined() const;
bool getUseSourcePathsForHeaderSearch() const;
bool setUseSourcePathsForHeaderSearch(bool useSourcePathsForHeaderSearch);
FilePath getVisualStudioSolutionPath() const;
bool setVisualStudioSolutionPath(const FilePath& visualStudioSolutionPath);
FilePath getCompilationDatabasePath() const;
bool setCompilationDatabasePath(const FilePath& compilationDatabasePath);
// info
std::string getDescription() const;
// used in project wizzard
std::string getProjectName() const;
void setProjectName(const std::string& name);
+22
View File
@@ -5,6 +5,23 @@
#include "utility/text/TextAccess.h"
#include "utility/utilityString.h"
Settings::Settings(const Settings& other)
: m_filePath(other.m_filePath)
, m_config(other.m_config->createCopy())
{
}
Settings& Settings::operator=(const Settings& other)
{
if (&other != this)
{
m_filePath = other.m_filePath;
m_config = other.m_config->createCopy();
}
return *this;
}
Settings::~Settings()
{
}
@@ -137,6 +154,11 @@ bool Settings::moveRelativePathValues(const std::string& key, const FilePath& fi
return setValues(key, values);
}
bool Settings::isValueDefined(const std::string& key) const
{
return m_config->isValueDefined(key);
}
void Settings::enableWarnings() const
{
m_config->setWarnOnEmptyKey(true);
+4
View File
@@ -11,6 +11,8 @@
class Settings
{
public:
Settings(const Settings& other);
Settings& operator=(const Settings& other);
virtual ~Settings();
bool load(const FilePath& filePath);
@@ -43,6 +45,8 @@ protected:
bool setPathValues(const std::string& key, const std::vector<FilePath>& paths);
bool moveRelativePathValues(const std::string& key, const FilePath& filePath);
bool isValueDefined(const std::string& key) const;
void enableWarnings() const;
void disableWarnings() const;