diff --git a/bin/app/data/ProjectSettings_template.xml b/bin/app/data/ProjectSettings_template.xml
index a45d4e79..fcefec73 100644
--- a/bin/app/data/ProjectSettings_template.xml
+++ b/bin/app/data/ProjectSettings_template.xml
@@ -9,46 +9,46 @@
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/bin/app/user/projects/javaparser/javaparser.coatiproject b/bin/app/user/projects/javaparser/javaparser.coatiproject
index 1fd4cb3a..d32070df 100644
--- a/bin/app/user/projects/javaparser/javaparser.coatiproject
+++ b/bin/app/user/projects/javaparser/javaparser.coatiproject
@@ -1,34 +1,32 @@
-
-
- WHAT IS THIS?\n
- \tJavaParser is an open-source Java project for parsing Java code and\n
- \tgenerating an Abstract Syntax Tree (AST). Additionally it supports a\n
- \tvisitor pattern to traverse the generated AST. For more information on\n
- \tthis project please visit javaparser.org\n
- \n
- LET'S GET STARTED!\n
- \tHave you ever wondered what a parser for a real programming language\n
- \tmay look like? Go ahead and find out!\n
- \n
- \tIf you ask yourself where to start, click the symbol linked below.\n
- \n
- [com\ts\tp\tngithub\ts\tp\tnjavaparser\ts\tp\tnast\ts\tp\tnbody\ts\tp\tnClassOrInterfaceDeclaration\ts\tp] // <- start here!\n\n
-
-
-
- Java
- 8
-
-
-
- .java
-
-
- ./src/main/java
- ./target/generated-sources/javacc
-
-
- 1
+
+ WHAT IS THIS?\n
+ \tJavaParser is an open-source Java project for parsing Java code and\n
+ \tgenerating an Abstract Syntax Tree (AST). Additionally it supports a\n
+ \tvisitor pattern to traverse the generated AST. For more information on\n
+ \tthis project please visit javaparser.org\n
+ \n
+ LET'S GET STARTED!\n
+ \tHave you ever wondered what a parser for a real programming language\n
+ \tmay look like? Go ahead and find out!\n
+ \n
+ \tIf you ask yourself where to start, click the symbol linked below.\n
+ \n
+ [com\ts\tp\tngithub\ts\tp\tnjavaparser\ts\tp\tnast\ts\tp\tnbody\ts\tp\tnClassOrInterfaceDeclaration\ts\tp] // <- start here!\n\n
+
+
+
+ Java Source Group
+
+ .java
+
+
+ ./src/main/java
+ ./target/generated-sources/javacc
+
+ 8
+
+
+ 4
diff --git a/bin/app/user/projects/tictactoe/tictactoe.coatiproject b/bin/app/user/projects/tictactoe/tictactoe.coatiproject
index 9b2248a7..b29d67c8 100644
--- a/bin/app/user/projects/tictactoe/tictactoe.coatiproject
+++ b/bin/app/user/projects/tictactoe/tictactoe.coatiproject
@@ -1,22 +1,20 @@
-
- C++
- c++1z
-
-
-
- .h
- .hpp
- .cpp
- .cxx
- .cc
- .c
-
-
- ./src
-
- 0
-
- 1
+
+
+
+ .cpp
+ .cxx
+ .cc
+ .c
+
+
+ ./src
+
+ c++1z
+ C++ Source Group
+ 0
+
+
+ 4
diff --git a/bin/app/user/projects/tutorial/tutorial.coatiproject b/bin/app/user/projects/tutorial/tutorial.coatiproject
index c8b77f79..99600fef 100644
--- a/bin/app/user/projects/tutorial/tutorial.coatiproject
+++ b/bin/app/user/projects/tutorial/tutorial.coatiproject
@@ -1,34 +1,31 @@
-
-
- WHAT IS THIS?\n
- \tThis is a tutorial and it is one of the fastest ways to get to know Coati.\n
- \n
- WHERE AM I?\n
- \tYou're looking at Coati's Code View which usually displays source code,\n
- \tbut every time a new project is loaded it gives a quick summary to\n
- \testimate the project's size. This is a fairly small project. It only\n
- \tcontains a few hundred lines of code as you can see by the numbers below.\n
- \n
- LET'S GET STARTED!\n
- \tTo keep things simple just click the "main" symbol below to start the tour.\n
- \n
- [main\tsint\tp()](); // <- start here\n\n
-
-
-
- C++
- c++1z
-
-
-
- .h
- .cpp
-
-
- ./src
-
-
- 1
+
+ WHAT IS THIS?\n
+ \tThis is a tutorial and it is one of the fastest ways to get to know Coati.\n
+ \n
+ WHERE AM I?\n
+ \tYou're looking at Coati's Code View which usually displays source code,\n
+ \tbut every time a new project is loaded it gives a quick summary to\n
+ \testimate the project's size. This is a fairly small project. It only\n
+ \tcontains a few hundred lines of code as you can see by the numbers below.\n
+ \n
+ LET'S GET STARTED!\n
+ \tTo keep things simple just click the "main" symbol below to start the tour.\n
+ \n
+ [main\tsint\tp()](); // <- start here\n\n
+
+
+
+ C++ Source Group
+
+ .cpp
+
+
+ ./src
+
+ c++1z
+
+
+ 4
diff --git a/bin/test/data/SettingsTestSuite/settings.xml b/bin/test/data/SettingsTestSuite/settings.xml
index dff68ad6..fe8f7f44 100644
--- a/bin/test/data/SettingsTestSuite/settings.xml
+++ b/bin/test/data/SettingsTestSuite/settings.xml
@@ -5,15 +5,17 @@
3.1416
Hello World!
-
-
- data
-
-
- data/
- src/
-
-
-
+
+
+ C++ Source Group
+
+ data
+
+
+ data/
+ src/
+
+
+
diff --git a/bin/test/data/log/test_log.txt b/bin/test/data/log/test_log.txt
index c900aa2f..5432087a 100644
--- a/bin/test/data/log/test_log.txt
+++ b/bin/test/data/log/test_log.txt
@@ -1,4 +1,3 @@
-Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
Token.cpp ERROR: Location Id was not referenced by this Token.
Node.cpp WARNING: Cannot change NodeType after it was already set from namespace to class
Edge.cpp ERROR: Nodes are not plain copies.
diff --git a/src/app/main.cpp b/src/app/main.cpp
index 9c2c4a6f..a26ea7ad 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -1,8 +1,5 @@
#include "Application.h"
#include "ApplicationStateMonitor.h"
-#include "ProjectFactoryModuleC.h"
-#include "ProjectFactoryModuleCpp.h"
-#include "ProjectFactoryModuleJava.h"
#include "data/indexer/IndexerFactory.h"
#include "data/indexer/IndexerFactoryModuleJava.h"
@@ -11,6 +8,11 @@
#include "includes.h" // defines 'void setup(int argc, char *argv[])'
#include "LicenseChecker.h"
+
+#include "project/SourceGroupFactory.h"
+#include "project/SourceGroupFactoryModuleC.h"
+#include "project/SourceGroupFactoryModuleCpp.h"
+#include "project/SourceGroupFactoryModuleJava.h"
#include "qt/network/QtNetworkFactory.h"
#include "qt/QtApplication.h"
#include "qt/QtCoreApplication.h"
@@ -166,9 +168,9 @@ int main(int argc, char *argv[])
prefillCxxHeaderPaths();
prefillCxxFrameworkPaths();
- Application::getInstance()->addProjectFactoryModule(std::make_shared());
- Application::getInstance()->addProjectFactoryModule(std::make_shared());
- Application::getInstance()->addProjectFactoryModule(std::make_shared());
+ SourceGroupFactory::getInstance()->addModule(std::make_shared());
+ SourceGroupFactory::getInstance()->addModule(std::make_shared());
+ SourceGroupFactory::getInstance()->addModule(std::make_shared());
IndexerFactory::getInstance()->addModule(std::make_shared());
IndexerFactory::getInstance()->addModule(std::make_shared());
@@ -228,9 +230,9 @@ int main(int argc, char *argv[])
prefillCxxHeaderPaths();
prefillCxxFrameworkPaths();
- Application::getInstance()->addProjectFactoryModule(std::make_shared());
- Application::getInstance()->addProjectFactoryModule(std::make_shared());
- Application::getInstance()->addProjectFactoryModule(std::make_shared());
+ SourceGroupFactory::getInstance()->addModule(std::make_shared());
+ SourceGroupFactory::getInstance()->addModule(std::make_shared());
+ SourceGroupFactory::getInstance()->addModule(std::make_shared());
IndexerFactory::getInstance()->addModule(std::make_shared());
IndexerFactory::getInstance()->addModule(std::make_shared());
diff --git a/src/lib/Application.cpp b/src/lib/Application.cpp
index cd75a7d1..55515bcc 100644
--- a/src/lib/Application.cpp
+++ b/src/lib/Application.cpp
@@ -19,6 +19,7 @@
#include "data/StorageCache.h"
#include "LicenseChecker.h"
#include "settings/ApplicationSettings.h"
+#include "settings/ProjectSettings.h"
#include "settings/ColorScheme.h"
void Application::createInstance(
@@ -105,11 +106,6 @@ Application::~Application()
}
}
-void Application::addProjectFactoryModule(std::shared_ptr module)
-{
- m_projectFactory.addModule(module);
-}
-
const std::shared_ptr Application::getCurrentProject()
{
return m_project;
@@ -155,10 +151,12 @@ void Application::createAndLoadProject(const FilePath& projectSettingsFilePath)
m_storageCache->clear();
m_storageCache->setSubject(nullptr);
- m_project = m_projectFactory.createProject(projectSettingsFilePath, m_storageCache.get(), getDialogView());
+ m_project = std::make_shared(std::make_shared(projectSettingsFilePath), m_storageCache.get());
if (m_project)
{
+ m_project->load();
+
if (m_hasGUI)
{
updateTitle();
diff --git a/src/lib/Application.h b/src/lib/Application.h
index a75d9ea0..868eacc2 100644
--- a/src/lib/Application.h
+++ b/src/lib/Application.h
@@ -4,6 +4,7 @@
#include
#include "component/ComponentManager.h"
+#include "project/Project.h"
#include "utility/messaging/MessageListener.h"
#include "utility/messaging/type/MessageActivateWindow.h"
#include "utility/messaging/type/MessageEnteredLicense.h"
@@ -11,8 +12,6 @@
#include "utility/messaging/type/MessageLoadProject.h"
#include "utility/messaging/type/MessageRefresh.h"
#include "utility/messaging/type/MessageSwitchColorScheme.h"
-#include "Project.h"
-#include "ProjectFactory.h"
class DialogView;
class IDECommunicationController;
@@ -21,7 +20,6 @@ class NetworkFactory;
class StorageCache;
class Version;
class ViewFactory;
-class ProjectFactoryModule;
class Application
: public MessageListener
@@ -39,8 +37,6 @@ public:
static void loadSettings();
static void loadStyle(const FilePath& colorSchemePath);
- void addProjectFactoryModule(std::shared_ptr module);
-
~Application();
const std::shared_ptr getCurrentProject();
@@ -76,7 +72,6 @@ private:
void updateTitle();
const bool m_hasGUI;
- ProjectFactory m_projectFactory;
std::shared_ptr m_project;
std::shared_ptr m_storageCache;
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
index af22d9b6..a7c3941e 100644
--- a/src/lib/CMakeLists.txt
+++ b/src/lib/CMakeLists.txt
@@ -221,25 +221,45 @@ add_files(
data/TaskMergeStorages.h
data/TaskShowStatusDialog.cpp
data/TaskShowStatusDialog.h
-
+
+ project/Project.cpp
+ project/Project.h
+ project/SourceGroupFactory.cpp
+ project/SourceGroupFactory.h
+ project/SourceGroupFactoryModule.cpp
+ project/SourceGroupFactoryModule.h
+ project/SourceGroup.cpp
+ project/SourceGroup.h
+
+ settings/migration/Migration.cpp
+ settings/migration/Migration.h
+ settings/migration/MigrationDeleteKey.cpp
+ settings/migration/MigrationDeleteKey.h
+ settings/migration/MigrationLambda.cpp
+ settings/migration/MigrationLambda.h
+ settings/migration/MigrationMoveKey.cpp
+ settings/migration/MigrationMoveKey.h
+ settings/migration/SettingsMigrator.cpp
+ settings/migration/SettingsMigrator.h
+
settings/ApplicationSettings.cpp
settings/ApplicationSettings.h
settings/ColorScheme.cpp
settings/ColorScheme.h
- settings/CxxProjectSettings.cpp
- settings/CxxProjectSettings.h
- settings/JavaProjectSettings.cpp
- settings/JavaProjectSettings.h
settings/LanguageType.cpp
settings/LanguageType.h
settings/ProjectSettings.cpp
settings/ProjectSettings.h
- settings/ProjectType.cpp
- settings/ProjectType.h
settings/Settings.cpp
settings/Settings.h
- settings/SettingsMigrator.cpp
- settings/SettingsMigrator.h
+ settings/SourceGroupSettings.cpp
+ settings/SourceGroupSettings.h
+ settings/SourceGroupSettingsCxx.cpp
+ settings/SourceGroupSettingsCxx.h
+ settings/SourceGroupSettingsJava.cpp
+ settings/SourceGroupSettingsJava.h
+ settings/SourceGroupType.cpp
+ settings/SourceGroupType.h
utility/commandline/CommandLineParser.cpp
utility/commandline/CommandLineParser.h
@@ -400,15 +420,6 @@ add_files(
utility/scheduling/TaskScheduler.h
utility/scheduling/TaskSetValue.h
- utility/solution/ISolutionParser.cpp
- utility/solution/ISolutionParser.h
- utility/solution/SolutionParserCodeBlocks.cpp
- utility/solution/SolutionParserCodeBlocks.h
- utility/solution/SolutionParserManager.cpp
- utility/solution/SolutionParserManager.h
- utility/solution/SolutionParserUtility.cpp
- utility/solution/SolutionParserUtility.h
-
utility/synchronization/ReaderWriterLock.cpp
utility/synchronization/ReaderWriterLock.h
utility/synchronization/ScopedReaderLock.cpp
@@ -458,10 +469,4 @@ add_files(
ApplicationStateMonitor.h
LicenseChecker.cpp
LicenseChecker.h
- Project.cpp
- Project.h
- ProjectFactory.cpp
- ProjectFactory.h
- ProjectFactoryModule.cpp
- ProjectFactoryModule.h
)
diff --git a/src/lib/Project.h b/src/lib/Project.h
deleted file mode 100644
index ce567e3c..00000000
--- a/src/lib/Project.h
+++ /dev/null
@@ -1,81 +0,0 @@
-#ifndef PROJECT_H
-#define PROJECT_H
-
-#include
-#include
-#include
-
-#include "utility/file/FileManager.h"
-
-#include "data/parser/Parser.h"
-#include "settings/LanguageType.h"
-
-class DialogView;
-class FileRegister;
-class PersistentStorage;
-class StorageProvider;
-class ProjectSettings;
-class StorageAccessProxy;
-class IndexerCommand;
-
-class Project
-{
-public:
- virtual ~Project();
-
- bool refresh(bool forceRefresh);
-
- FilePath getProjectSettingsFilePath() const;
- LanguageType getLanguage() const;
- std::string getDescription() const;
-
- std::set getSourceFilePaths() const;
-
- bool settingsEqualExceptNameAndLocation(const ProjectSettings& otherSettings) const;
- void setStateSettingsUpdated();
-
-protected:
- Project(StorageAccessProxy* storageAccessProxy, std::shared_ptr dialogView);
- std::shared_ptr getDialogView() const;
- std::vector getSourcePaths() const;
-
- virtual std::shared_ptr getProjectSettings() = 0;
- virtual const std::shared_ptr getProjectSettings() const = 0;
-
-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& filesToClean, const std::set& filesToIndex, bool fullRefresh);
-
- virtual bool prepareIndexing();
- virtual bool prepareRefresh();
- virtual std::vector> getIndexerCommands() = 0;
- std::vector> getIndexerCommands(const std::set& sourceFiles);
- virtual void updateFileManager(FileManager& fileManager) = 0;
-
- StorageAccessProxy* const m_storageAccessProxy;
- std::shared_ptr m_dialogView;
-
- ProjectStateType m_state;
- FileManager m_fileManager;
-
- std::shared_ptr m_storage;
-};
-
-#endif // PROJECT_H
diff --git a/src/lib/ProjectFactory.cpp b/src/lib/ProjectFactory.cpp
deleted file mode 100644
index dde690a3..00000000
--- a/src/lib/ProjectFactory.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-#include "ProjectFactory.h"
-
-#include "component/view/DialogView.h"
-#include "data/access/StorageAccessProxy.h"
-#include "settings/ProjectSettings.h"
-#include "utility/file/FilePath.h"
-
-#include "Project.h"
-#include "ProjectFactoryModule.h"
-
-void ProjectFactory::addModule(std::shared_ptr module)
-{
- m_modules[module->getLanguage()] = module;
-}
-
-std::shared_ptr ProjectFactory::createProject(
- const FilePath& projectSettingsFile, StorageAccessProxy* storageAccessProxy, std::shared_ptr dialogView)
-{
- std::shared_ptr project;
-
- std::map>::const_iterator it = m_modules.find(
- ProjectSettings::getLanguageOfProject(projectSettingsFile)
- );
-
- if (it != m_modules.end())
- {
- project = it->second->createProject(projectSettingsFile, storageAccessProxy, dialogView);
- }
-
- if (project)
- {
- project->load();
- }
- return project;
-}
diff --git a/src/lib/ProjectFactory.h b/src/lib/ProjectFactory.h
deleted file mode 100644
index 74a8f764..00000000
--- a/src/lib/ProjectFactory.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef PROJECT_FACTORY_H
-#define PROJECT_FACTORY_H
-
-#include