build: allow to disable language support in cmake
* in addition: add unloadable sourcegroup to visualize, load and save information when loading a project that contains source groups that are not supported by the build
This commit is contained in:
@@ -4,6 +4,7 @@ std::string sourceGroupTypeToString(SourceGroupType v)
|
||||
{
|
||||
switch (v)
|
||||
{
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
case SOURCE_GROUP_C_EMPTY:
|
||||
return "C Source Group";
|
||||
case SOURCE_GROUP_CPP_EMPTY:
|
||||
@@ -14,14 +15,19 @@ std::string sourceGroupTypeToString(SourceGroupType v)
|
||||
return "C/C++ from Code::Blocks";
|
||||
case SOURCE_GROUP_CXX_VS:
|
||||
return "C/C++ from Visual Studio";
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
case SOURCE_GROUP_JAVA_EMPTY:
|
||||
return "Java Source Group";
|
||||
case SOURCE_GROUP_JAVA_MAVEN:
|
||||
return "Java Source Group from Maven";
|
||||
case SOURCE_GROUP_JAVA_GRADLE:
|
||||
return "Java Source Group from Gradle";
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
#if BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
case SOURCE_GROUP_PYTHON_EMPTY:
|
||||
return "Python Source Group";
|
||||
#endif // BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
case SOURCE_GROUP_CUSTOM_COMMAND:
|
||||
return "Custom Command Source Group";
|
||||
case SOURCE_GROUP_UNKNOWN:
|
||||
@@ -34,6 +40,7 @@ std::string sourceGroupTypeToProjectSetupString(SourceGroupType v)
|
||||
{
|
||||
switch (v)
|
||||
{
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
case SOURCE_GROUP_C_EMPTY:
|
||||
return "Empty C Source Group";
|
||||
case SOURCE_GROUP_CPP_EMPTY:
|
||||
@@ -44,14 +51,19 @@ std::string sourceGroupTypeToProjectSetupString(SourceGroupType v)
|
||||
return "C/C++ from Code::Blocks";
|
||||
case SOURCE_GROUP_CXX_VS:
|
||||
return "C/C++ from Visual Studio";
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
case SOURCE_GROUP_JAVA_EMPTY:
|
||||
return "Empty Java Source Group";
|
||||
case SOURCE_GROUP_JAVA_MAVEN:
|
||||
return "Java Source Group from Maven";
|
||||
case SOURCE_GROUP_JAVA_GRADLE:
|
||||
return "Java Source Group from Gradle";
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
#if BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
case SOURCE_GROUP_PYTHON_EMPTY:
|
||||
return "Empty Python Source Group";
|
||||
#endif // BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
case SOURCE_GROUP_CUSTOM_COMMAND:
|
||||
return "Custom Command Source Group";
|
||||
case SOURCE_GROUP_UNKNOWN:
|
||||
@@ -62,43 +74,49 @@ std::string sourceGroupTypeToProjectSetupString(SourceGroupType v)
|
||||
|
||||
SourceGroupType stringToSourceGroupType(const std::string& v)
|
||||
{
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
if (v == sourceGroupTypeToString(SOURCE_GROUP_C_EMPTY))
|
||||
{
|
||||
return SOURCE_GROUP_C_EMPTY;
|
||||
}
|
||||
else if (v == sourceGroupTypeToString(SOURCE_GROUP_CPP_EMPTY))
|
||||
if (v == sourceGroupTypeToString(SOURCE_GROUP_CPP_EMPTY))
|
||||
{
|
||||
return SOURCE_GROUP_CPP_EMPTY;
|
||||
}
|
||||
else if (v == sourceGroupTypeToString(SOURCE_GROUP_CXX_CDB))
|
||||
if (v == sourceGroupTypeToString(SOURCE_GROUP_CXX_CDB))
|
||||
{
|
||||
return SOURCE_GROUP_CXX_CDB;
|
||||
}
|
||||
else if (v == sourceGroupTypeToString(SOURCE_GROUP_CXX_CODEBLOCKS))
|
||||
if (v == sourceGroupTypeToString(SOURCE_GROUP_CXX_CODEBLOCKS))
|
||||
{
|
||||
return SOURCE_GROUP_CXX_CODEBLOCKS;
|
||||
}
|
||||
else if (v == sourceGroupTypeToString(SOURCE_GROUP_CXX_VS))
|
||||
if (v == sourceGroupTypeToString(SOURCE_GROUP_CXX_VS))
|
||||
{
|
||||
return SOURCE_GROUP_CXX_VS;
|
||||
}
|
||||
else if (v == sourceGroupTypeToString(SOURCE_GROUP_JAVA_EMPTY))
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
if (v == sourceGroupTypeToString(SOURCE_GROUP_JAVA_EMPTY))
|
||||
{
|
||||
return SOURCE_GROUP_JAVA_EMPTY;
|
||||
}
|
||||
else if (v == sourceGroupTypeToString(SOURCE_GROUP_JAVA_MAVEN))
|
||||
if (v == sourceGroupTypeToString(SOURCE_GROUP_JAVA_MAVEN))
|
||||
{
|
||||
return SOURCE_GROUP_JAVA_MAVEN;
|
||||
}
|
||||
else if (v == sourceGroupTypeToString(SOURCE_GROUP_JAVA_GRADLE))
|
||||
if (v == sourceGroupTypeToString(SOURCE_GROUP_JAVA_GRADLE))
|
||||
{
|
||||
return SOURCE_GROUP_JAVA_GRADLE;
|
||||
}
|
||||
else if (v == sourceGroupTypeToString(SOURCE_GROUP_PYTHON_EMPTY))
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
#if BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
if (v == sourceGroupTypeToString(SOURCE_GROUP_PYTHON_EMPTY))
|
||||
{
|
||||
return SOURCE_GROUP_PYTHON_EMPTY;
|
||||
}
|
||||
else if (v == sourceGroupTypeToString(SOURCE_GROUP_CUSTOM_COMMAND))
|
||||
#endif // BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
if (v == sourceGroupTypeToString(SOURCE_GROUP_CUSTOM_COMMAND))
|
||||
{
|
||||
return SOURCE_GROUP_CUSTOM_COMMAND;
|
||||
}
|
||||
|
||||
@@ -1,19 +1,27 @@
|
||||
#ifndef SOURCE_GROUP_TYPE_H
|
||||
#define SOURCE_GROUP_TYPE_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
enum SourceGroupType
|
||||
{
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
SOURCE_GROUP_C_EMPTY,
|
||||
SOURCE_GROUP_CPP_EMPTY,
|
||||
SOURCE_GROUP_CXX_CDB,
|
||||
SOURCE_GROUP_CXX_CODEBLOCKS,
|
||||
SOURCE_GROUP_CXX_VS,
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
SOURCE_GROUP_JAVA_EMPTY,
|
||||
SOURCE_GROUP_JAVA_MAVEN,
|
||||
SOURCE_GROUP_JAVA_GRADLE,
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
SOURCE_GROUP_PYTHON_EMPTY,
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
SOURCE_GROUP_CUSTOM_COMMAND,
|
||||
SOURCE_GROUP_UNKNOWN
|
||||
};
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "SourceGroupSettingsWithCStandard.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "ProjectSettings.h"
|
||||
|
||||
std::wstring SourceGroupSettingsWithCStandard::getDefaultCStandardStatic()
|
||||
@@ -67,3 +69,5 @@ std::wstring SourceGroupSettingsWithCStandard::getDefaultCStandard() const
|
||||
{
|
||||
return getDefaultCStandardStatic();
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_WITH_C_STANDARD_H
|
||||
#define SOURCE_GROUP_SETTINGS_WITH_C_STANDARD_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "SourceGroupSettingsComponent.h"
|
||||
@@ -30,4 +34,6 @@ private:
|
||||
std::wstring m_cStandard;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_WITH_C_STANDARD_H
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "SourceGroupSettingsWithCppStandard.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "ProjectSettings.h"
|
||||
|
||||
std::wstring SourceGroupSettingsWithCppStandard::getDefaultCppStandardStatic()
|
||||
@@ -67,3 +69,5 @@ std::wstring SourceGroupSettingsWithCppStandard::getDefaultCppStandard() const
|
||||
{
|
||||
return getDefaultCppStandardStatic();
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_WITH_CPP_STANDARD_H
|
||||
#define SOURCE_GROUP_SETTINGS_WITH_CPP_STANDARD_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "SourceGroupSettingsComponent.h"
|
||||
@@ -30,4 +34,6 @@ private:
|
||||
std::wstring m_cppStandard;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_WITH_CPP_STANDARD_H
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "SourceGroupSettingsWithCxxCdbPath.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "ProjectSettings.h"
|
||||
#include "utilityFile.h"
|
||||
|
||||
@@ -39,3 +41,5 @@ void SourceGroupSettingsWithCxxCdbPath::save(ConfigManager* config, const std::s
|
||||
{
|
||||
config->setValue(key + "/build_file_path/compilation_db_path", getCompilationDatabasePath().wstr());
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_WITH_CXX_CDB_PATH_H
|
||||
#define SOURCE_GROUP_SETTINGS_WITH_CXX_CDB_PATH_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "FilePath.h"
|
||||
#include "SourceGroupSettingsComponent.h"
|
||||
|
||||
@@ -24,4 +28,6 @@ private:
|
||||
FilePath m_compilationDatabasePath;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_WITH_CXX_CDB_PATH_H
|
||||
|
||||
+4
@@ -1,5 +1,7 @@
|
||||
#include "SourceGroupSettingsWithCxxCodeblocksPath.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "ProjectSettings.h"
|
||||
#include "utilityFile.h"
|
||||
|
||||
@@ -38,3 +40,5 @@ void SourceGroupSettingsWithCxxCodeblocksPath::save(ConfigManager* config, const
|
||||
{
|
||||
config->setValue(key + "/codeblocks_project_path", getCodeblocksProjectPath().wstr());
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_WITH_CXX_CODEBLOCKS_PATH_H
|
||||
#define SOURCE_GROUP_SETTINGS_WITH_CXX_CODEBLOCKS_PATH_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "FilePath.h"
|
||||
#include "SourceGroupSettingsComponent.h"
|
||||
|
||||
@@ -24,4 +28,6 @@ private:
|
||||
FilePath m_codeblocksProjectPath;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_WITH_CXX_CODEBLOCKS_PATH_H
|
||||
|
||||
+4
-1
@@ -1,7 +1,8 @@
|
||||
#include "SourceGroupSettingsWithCxxCrossCompilationOptions.h"
|
||||
|
||||
#include "ProjectSettings.h"
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "ProjectSettings.h"
|
||||
|
||||
std::vector<std::wstring> SourceGroupSettingsWithCxxCrossCompilationOptions::getAvailableArchTypes()
|
||||
{
|
||||
@@ -232,3 +233,5 @@ void SourceGroupSettingsWithCxxCrossCompilationOptions::save(ConfigManager* conf
|
||||
config->setValue(key + "/cross_compilation/target/sys", getTargetSys());
|
||||
config->setValue(key + "/cross_compilation/target/abi", getTargetAbi());
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
+6
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_WITH_CXX_CROSS_COMPILATION_OPTIONS_H
|
||||
#define SOURCE_GROUP_SETTINGS_WITH_CXX_CROSS_COMPILATION_OPTIONS_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "SourceGroupSettingsComponent.h"
|
||||
@@ -47,4 +51,6 @@ private:
|
||||
std::wstring m_targetAbi;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_WITH_CXX_CROSS_COMPILATION_OPTIONS_H
|
||||
|
||||
+4
@@ -1,5 +1,7 @@
|
||||
#include "SourceGroupSettingsWithCxxPathsAndFlags.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "ProjectSettings.h"
|
||||
#include "utility.h"
|
||||
|
||||
@@ -69,3 +71,5 @@ void SourceGroupSettingsWithCxxPathsAndFlags::save(ConfigManager* config, const
|
||||
config->setValues(key + "/framework_search_paths/framework_search_path", getFrameworkSearchPaths());
|
||||
config->setValues(key + "/compiler_flags/compiler_flag", getCompilerFlags());
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_WITH_CXX_PATHS_AND_FLAGS_H
|
||||
#define SOURCE_GROUP_SETTINGS_WITH_CXX_PATHS_AND_FLAGS_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "FilePath.h"
|
||||
@@ -35,4 +39,6 @@ private:
|
||||
std::vector<std::wstring> m_compilerFlags;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_WITH_CXX_PATHS_AND_FLAGS_H
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "SourceGroupSettingsWithCxxPchOptions.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "ProjectSettings.h"
|
||||
#include "utility.h"
|
||||
#include "utilityFile.h"
|
||||
@@ -70,3 +72,5 @@ void SourceGroupSettingsWithCxxPchOptions::setPchFlags(const std::vector<std::ws
|
||||
{
|
||||
m_pchFlags = pchFlags;
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_WITH_CXX_PCH_OPTIONS_H
|
||||
#define SOURCE_GROUP_SETTINGS_WITH_CXX_PCH_OPTIONS_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "FilePath.h"
|
||||
#include "SourceGroupSettingsComponent.h"
|
||||
|
||||
@@ -34,4 +38,6 @@ private:
|
||||
bool m_useCompilerFlags = true;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_WITH_CXX_PCH_OPTIONS_H
|
||||
|
||||
+4
@@ -1,5 +1,7 @@
|
||||
#include "SourceGroupSettingsWithIndexedHeaderPaths.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "ProjectSettings.h"
|
||||
#include "utility.h"
|
||||
|
||||
@@ -38,3 +40,5 @@ void SourceGroupSettingsWithIndexedHeaderPaths::save(ConfigManager* config, cons
|
||||
{
|
||||
config->setValues(key + "/indexed_header_paths/indexed_header_path", getIndexedHeaderPaths());
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
+6
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_WITH_INDEXED_HEADER_PATHS_H
|
||||
#define SOURCE_GROUP_SETTINGS_WITH_INDEXED_HEADER_PATHS_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "SourceGroupSettingsComponent.h"
|
||||
@@ -27,4 +31,6 @@ private:
|
||||
std::vector<FilePath> m_indexedHeaderPaths;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_WITH_INDEXED_HEADER_PATHS_H
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_WITH_SOURCE_EXTENSIONS_C_H
|
||||
#define SOURCE_GROUP_SETTINGS_WITH_SOURCE_EXTENSIONS_C_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "SourceGroupSettingsWithSourceExtensions.h"
|
||||
|
||||
class SourceGroupSettingsWithSourceExtensionsC
|
||||
@@ -13,4 +17,6 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_WITH_SOURCE_EXTENSIONS_C_H
|
||||
|
||||
+6
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_WITH_SOURCE_EXTENSIONS_CPP_H
|
||||
#define SOURCE_GROUP_SETTINGS_WITH_SOURCE_EXTENSIONS_CPP_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "SourceGroupSettingsWithSourceExtensions.h"
|
||||
|
||||
class SourceGroupSettingsWithSourceExtensionsCpp
|
||||
@@ -17,4 +21,6 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_WITH_SOURCE_EXTENSIONS_CPP_H
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "SourceGroupSettingsWithClasspath.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include "ProjectSettings.h"
|
||||
#include "utility.h"
|
||||
|
||||
@@ -50,3 +52,5 @@ void SourceGroupSettingsWithClasspath::save(ConfigManager* config, const std::st
|
||||
config->setValues(key + "/class_paths/class_path", getClasspath());
|
||||
config->setValue(key + "/use_jre_system_library", getUseJreSystemLibrary());
|
||||
}
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_WITH_CLASSPATH_H
|
||||
#define SOURCE_GROUP_SETTINGS_WITH_CLASSPATH_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "FilePath.h"
|
||||
@@ -30,4 +34,6 @@ private:
|
||||
bool m_useJreSystemLibrary = true;
|
||||
};
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_WITH_CLASSPATH_H
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "SourceGroupSettingsWithJavaGradle.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include "ConfigManager.h"
|
||||
#include "ProjectSettings.h"
|
||||
#include "utilityFile.h"
|
||||
@@ -56,3 +58,5 @@ void SourceGroupSettingsWithJavaGradle::save(ConfigManager* config, const std::s
|
||||
config->setValue(key + "/gradle/project_file_path", getGradleProjectFilePath().wstr());
|
||||
config->setValue(key + "/gradle/should_index_tests", getShouldIndexGradleTests());
|
||||
}
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_WITH_JAVA_GRADLE_H
|
||||
#define SOURCE_GROUP_SETTINGS_WITH_JAVA_GRADLE_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include "FilePath.h"
|
||||
#include "SourceGroupSettingsComponent.h"
|
||||
|
||||
@@ -30,4 +34,6 @@ private:
|
||||
bool m_shouldIndexGradleTests = false;
|
||||
};
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_WITH_JAVA_GRADLE_H
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "SourceGroupSettingsWithJavaMaven.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include "ConfigManager.h"
|
||||
#include "ProjectSettings.h"
|
||||
#include "utilityFile.h"
|
||||
@@ -56,3 +58,5 @@ void SourceGroupSettingsWithJavaMaven::save(ConfigManager* config, const std::st
|
||||
config->setValue(key + "/maven/project_file_path", getMavenProjectFilePath().wstr());
|
||||
config->setValue(key + "/maven/should_index_tests", getShouldIndexMavenTests());
|
||||
}
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_WITH_JAVA_MAVEN_H
|
||||
#define SOURCE_GROUP_SETTINGS_WITH_JAVA_MAVEN_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include "FilePath.h"
|
||||
#include "SourceGroupSettingsComponent.h"
|
||||
|
||||
@@ -30,4 +34,6 @@ private:
|
||||
bool m_shouldIndexMavenTests = false;
|
||||
};
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_WITH_JAVA_MAVEN_H
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "SourceGroupSettingsWithJavaStandard.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include "ProjectSettings.h"
|
||||
|
||||
std::wstring SourceGroupSettingsWithJavaStandard::getDefaultJavaStandardStatic()
|
||||
@@ -50,3 +52,5 @@ std::wstring SourceGroupSettingsWithJavaStandard::getDefaultJavaStandard() const
|
||||
{
|
||||
return getDefaultJavaStandardStatic();
|
||||
}
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_WITH_JAVA_STANDARD_H
|
||||
#define SOURCE_GROUP_SETTINGS_WITH_JAVA_STANDARD_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "SourceGroupSettingsComponent.h"
|
||||
@@ -30,4 +34,6 @@ private:
|
||||
std::wstring m_javaStandard;
|
||||
};
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_WITH_JAVA_STANDARD_H
|
||||
|
||||
+6
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_WITH_SOURCE_EXTENSIONS_JAVA_H
|
||||
#define SOURCE_GROUP_SETTINGS_WITH_SOURCE_EXTENSIONS_JAVA_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include "SourceGroupSettingsWithSourceExtensions.h"
|
||||
|
||||
class SourceGroupSettingsWithSourceExtensionsJava
|
||||
@@ -13,4 +17,6 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_WITH_SOURCE_EXTENSIONS_JAVA_H
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_C_EMPTY_H
|
||||
#define SOURCE_GROUP_SETTINGS_C_EMPTY_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "SourceGroupSettingsWithComponents.h"
|
||||
#include "SourceGroupSettingsWithCStandard.h"
|
||||
#include "SourceGroupSettingsWithCxxCrossCompilationOptions.h"
|
||||
@@ -32,4 +36,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_C_EMPTY_H
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_CPP_EMPTY_H
|
||||
#define SOURCE_GROUP_SETTINGS_CPP_EMPTY_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "SourceGroupSettingsWithComponents.h"
|
||||
#include "SourceGroupSettingsWithCppStandard.h"
|
||||
#include "SourceGroupSettingsWithCxxCrossCompilationOptions.h"
|
||||
@@ -32,4 +36,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_CPP_EMPTY_H
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_CXX_CDB_H
|
||||
#define SOURCE_GROUP_SETTINGS_CXX_CDB_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "SourceGroupSettingsWithComponents.h"
|
||||
#include "SourceGroupSettingsWithCxxCdbPath.h"
|
||||
#include "SourceGroupSettingsWithCxxPathsAndFlags.h"
|
||||
@@ -28,4 +32,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_CXX_CDB_H
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_CXX_CDB_VS_H
|
||||
#define SOURCE_GROUP_SETTINGS_CXX_CDB_VS_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "SourceGroupSettingsCxxCdb.h"
|
||||
|
||||
class SourceGroupSettingsCxxCdbVs
|
||||
@@ -9,4 +13,6 @@ class SourceGroupSettingsCxxCdbVs
|
||||
using SourceGroupSettingsCxxCdb::SourceGroupSettingsCxxCdb;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_CXX_CDB_VS_H
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_CXX_CODEBLOCKS_H
|
||||
#define SOURCE_GROUP_SETTINGS_CXX_CODEBLOCKS_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "SourceGroupSettingsWithComponents.h"
|
||||
#include "SourceGroupSettingsWithCppStandard.h"
|
||||
#include "SourceGroupSettingsWithCStandard.h"
|
||||
@@ -32,4 +36,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_CXX_CODEBLOCKS_H
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_JAVA_EMPTY_H
|
||||
#define SOURCE_GROUP_SETTINGS_JAVA_EMPTY_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include "SourceGroupSettingsWithComponents.h"
|
||||
#include "SourceGroupSettingsWithClasspath.h"
|
||||
#include "SourceGroupSettingsWithExcludeFilters.h"
|
||||
@@ -28,4 +32,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_JAVA_EMPTY_H
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_JAVA_GRADLE_H
|
||||
#define SOURCE_GROUP_SETTINGS_JAVA_GRADLE_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include "SourceGroupSettingsWithComponents.h"
|
||||
#include "SourceGroupSettingsWithExcludeFilters.h"
|
||||
#include "SourceGroupSettingsWithJavaGradle.h"
|
||||
@@ -26,4 +30,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_JAVA_GRADLE_H
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_JAVA_MAVEN_H
|
||||
#define SOURCE_GROUP_SETTINGS_JAVA_MAVEN_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include "SourceGroupSettingsWithComponents.h"
|
||||
#include "SourceGroupSettingsWithExcludeFilters.h"
|
||||
#include "SourceGroupSettingsWithJavaMaven.h"
|
||||
@@ -26,4 +30,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_JAVA_MAVEN_H
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_PYTHON_EMPTY_H
|
||||
#define SOURCE_GROUP_SETTINGS_PYTHON_EMPTY_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
|
||||
#include "SourceGroupSettingsWithComponents.h"
|
||||
#include "SourceGroupSettingsWithExcludeFilters.h"
|
||||
#include "SourceGroupSettingsWithPythonEnvironmentPath.h"
|
||||
@@ -26,4 +30,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#endif // BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_PYTHON_EMPTY_H
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
#ifndef SOURCE_GROUP_SETTINGS_UNLOADABLE_H
|
||||
#define SOURCE_GROUP_SETTINGS_UNLOADABLE_H
|
||||
|
||||
#include "SourceGroupSettings.h"
|
||||
|
||||
class SourceGroupSettingsUnloadable : public SourceGroupSettings
|
||||
{
|
||||
public:
|
||||
SourceGroupSettingsUnloadable(const std::string& id, const ProjectSettings* projectSettings)
|
||||
: SourceGroupSettings(SOURCE_GROUP_UNKNOWN, id, projectSettings)
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<SourceGroupSettings> createCopy() const override
|
||||
{
|
||||
return std::make_shared<SourceGroupSettingsUnloadable>(*this);
|
||||
}
|
||||
|
||||
void loadSettings(const ConfigManager* config) override
|
||||
{
|
||||
const std::string key = s_keyPrefix + getId();
|
||||
|
||||
SourceGroupSettings::load(config, key);
|
||||
setStatus(SOURCE_GROUP_STATUS_DISABLED);
|
||||
|
||||
m_content.clear();
|
||||
|
||||
std::vector<std::string> unprocessedKeys = { key };
|
||||
|
||||
while (!unprocessedKeys.empty())
|
||||
{
|
||||
const std::string unprocessedKey = unprocessedKeys.back();
|
||||
unprocessedKeys.pop_back();
|
||||
for (const std::string& memberKey : config->getSublevelKeys(unprocessedKey))
|
||||
{
|
||||
const std::vector<std::string> values = config->getValuesOrDefaults<std::string>(memberKey, {});
|
||||
if (!values.empty())
|
||||
{
|
||||
m_content[memberKey] = values;
|
||||
}
|
||||
else
|
||||
{
|
||||
unprocessedKeys.push_back(memberKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void saveSettings(ConfigManager* config) override
|
||||
{
|
||||
for (auto it : m_content)
|
||||
{
|
||||
config->setValues(it.first, it.second);
|
||||
}
|
||||
}
|
||||
|
||||
bool equalsSettings(const SourceGroupSettingsBase* other) override
|
||||
{
|
||||
if (!SourceGroupSettings::equals(other))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
//compare values
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
std::map<std::string, std::vector<std::string>> m_content;
|
||||
|
||||
};
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_UNLOADABLE_H
|
||||
Reference in New Issue
Block a user