build: renaming to sourcetrail

This commit is contained in:
Andreas Stallinger
2017-04-07 13:19:09 +02:00
parent 8391a6da57
commit 045a259b2e
224 changed files with 885 additions and 4271 deletions
+1 -1
View File
@@ -343,7 +343,7 @@ void Application::updateTitle()
{
if (m_hasGUI)
{
std::string title = m_isInTrial ? "Coati Trial" : "Coati";
std::string title = m_isInTrial ? "Sourcetrail Trial" : "Sourcetrail";
if (m_project)
{
@@ -275,7 +275,7 @@ std::string NetworkProtocolHelper::buildPingMessage()
messageStream << m_pingPrefix;
messageStream << m_divider;
messageStream << "coati";
messageStream << "sourcetrail";
messageStream << m_endOfMessageToken;
return messageStream.str();
+5 -4
View File
@@ -78,8 +78,8 @@ bool Project::refresh(bool forceRefresh)
case PROJECT_STATE_OUTVERSIONED:
question =
"This project was indexed with a different version of Coati. It needs to be fully reindexed to be used "
"with this version of Coati. Do you want to reindex the project?";
"This project was indexed with a different version of Sourcetrail. It needs to be fully reindexed to be used "
"with this version of Sourcetrail. Do you want to reindex the project?";
needsFullRefresh = true;
break;
@@ -92,7 +92,7 @@ bool Project::refresh(bool forceRefresh)
case PROJECT_STATE_NEEDS_MIGRATION:
question =
"This project was created with a different version of Coati. The project file needs to get updated and "
"This project was created with a different version of Sourcetrail. The project file needs to get updated and "
"the project fully reindexed. Do you want to update the project file and reindex the project?";
needsFullRefresh = true;
@@ -187,7 +187,8 @@ void Project::load()
}
const FilePath projectSettingsPath = m_settings->getFilePath();
const FilePath dbPath = FilePath(projectSettingsPath).replaceExtension("coatidb");
const std::string dbExtension = (projectSettingsPath.extension() == ".coatiproject" ? "coatidb" : "srctrldb");
const FilePath dbPath = FilePath(projectSettingsPath).replaceExtension(dbExtension);
m_storage = std::make_shared<PersistentStorage>(dbPath);
+9 -5
View File
@@ -7,7 +7,7 @@
#include "utility/utility.h"
#include "utility/UserPaths.h"
const size_t ApplicationSettings::VERSION = 1;
const size_t ApplicationSettings::VERSION = 2;
std::shared_ptr<ApplicationSettings> ApplicationSettings::s_instance;
@@ -51,6 +51,10 @@ bool ApplicationSettings::load(const FilePath& filePath)
"application/indexer_thread_count",
"indexing/indexer_thread_count"
));
migrator.addMigration(2, std::make_shared<MigrationMoveKey>(
"network/coati_port",
"network/sourcetrail_port"
));
bool migrated = migrator.migrate(this, ApplicationSettings::VERSION);
@@ -366,14 +370,14 @@ void ApplicationSettings::setPluginPort(const int pluginPort)
setValue<int>("network/plugin_port", pluginPort);
}
int ApplicationSettings::getCoatiPort() const
int ApplicationSettings::getSourcetrailPort() const
{
return getValue<int>("network/coati_port", 6667);
return getValue<int>("network/sourcetrail_port", 6667);
}
void ApplicationSettings::setCoatiPort(const int coatiPort)
void ApplicationSettings::setSourcetrailPort(const int sourcetrailPort)
{
setValue<int>("network/coati_port", coatiPort);
setValue<int>("network/sourcetrail_port", sourcetrailPort);
}
int ApplicationSettings::getControlsMouseBackButton() const
+2 -2
View File
@@ -108,8 +108,8 @@ public:
int getPluginPort() const;
void setPluginPort(const int pluginPort);
int getCoatiPort() const;
void setCoatiPort(const int coatiPort);
int getSourcetrailPort() const;
void setSourcetrailPort(const int sourcetrailPort);
// controls
int getControlsMouseBackButton() const;
+4 -3
View File
@@ -10,6 +10,7 @@
#include "utility/UUIDUtility.h"
const size_t ProjectSettings::VERSION = 4;
const std::string PROJECT_FILE_EXTENSION = ".srctrlprj";
LanguageType ProjectSettings::getLanguageOfProject(const FilePath& filePath)
{
@@ -46,7 +47,7 @@ ProjectSettings::ProjectSettings(const FilePath& projectFilePath)
ProjectSettings::ProjectSettings(std::string projectName, const FilePath& projectFileLocation)
{
setFilePath(FilePath(projectFileLocation.str() + "/" + projectName + ".coatiproject"));
setFilePath(FilePath(projectFileLocation.str() + "/" + projectName + PROJECT_FILE_EXTENSION));
}
ProjectSettings::~ProjectSettings()
@@ -112,7 +113,7 @@ std::string ProjectSettings::getProjectName() const
void ProjectSettings::setProjectName(const std::string& name)
{
setFilePath(FilePath(getProjectFileLocation().str() + "/" + name + ".coatiproject"));
setFilePath(FilePath(getProjectFileLocation().str() + "/" + name + PROJECT_FILE_EXTENSION));
}
FilePath ProjectSettings::getProjectFileLocation() const
@@ -122,7 +123,7 @@ FilePath ProjectSettings::getProjectFileLocation() const
void ProjectSettings::setProjectFileLocation(const FilePath& location)
{
setFilePath(FilePath(location.str() + "/" + getProjectName() + ".coatiproject"));
setFilePath(FilePath(location.str() + "/" + getProjectName() + PROJECT_FILE_EXTENSION));
}
std::string ProjectSettings::getDescription() const
@@ -23,23 +23,23 @@ CommandLineParser::CommandLineParser(int argc, char** argv, const std::string& v
std::string projectfile_db;
std::string licensefile;
std::string licensetext;
po::options_description desc("Coati");
po::options_description desc("Sourcetrail");
desc.add_options()
("help,h", "Print this help message")
("version,v", "Version of Coati")
("project,p", "Load Coati with a Coatiprojectfile")
("version,v", "Version of Sourcetrail")
("project,p", "Load Sourcetrail with a Sourcetrailprojectfile")
;
po::positional_options_description positionalOption;
positionalOption.add("project-file", 1);
po::options_description hidden_desc("hidden commandlineflags");
hidden_desc.add_options()
("force,f", "Force coati to parse if database exists")
("force,f", "Force sourcetrail to parse if database exists")
("licenseFile,z", po::value<std::string>(&licensefile), "Enter license via Licensefile")
("license,l", po::value<std::string>(&licensetext), "Enter licenes via commandline")
("hidden", "Print this help message with hidden arguments")
("database,d", "Start coati to parse a Coati projectfile to get a coatidatabase")
("project-file", po::value<std::string>(&projectfile), "Coati project file");
("database,d", "Start sourcetrail to parse a Sourcetrail projectfile to get a sourcetraildatabase")
("project-file", po::value<std::string>(&projectfile), "Sourcetrail project file");
;
po::options_description all("Allowed options");
all.add(desc).add(hidden_desc);
@@ -87,7 +87,7 @@ CommandLineParser::CommandLineParser(int argc, char** argv, const std::string& v
if (vm.count("version"))
{
std::cout << "Coati Version " << version << std::endl;
std::cout << "Sourcetrail Version " << version << std::endl;
m_quit = true;
}
@@ -159,7 +159,7 @@ void CommandLineParser::processProjectfile(const std::string& file)
return;
}
if (projectfile.extension() != ".coatiproject")
if (projectfile.extension() != ".srctrlprj" && projectfile.extension() != ".coatiproject")
{
m_errorString = errorstring + " has a wrong fileending";
return;
@@ -177,7 +177,8 @@ void CommandLineParser::processProjectfile(const std::string& file)
void CommandLineParser::projectLoad()
{
if (m_projectFile.exists() && m_projectFile.extension() == ".coatiproject")
if (m_projectFile.exists() &&
(m_projectFile.extension() == ".srctrlprj" || m_projectFile.extension() == ".coatiproject"))
{
MessageLoadProject(m_projectFile.str(), m_force).dispatch();
}
@@ -8,7 +8,7 @@
#include "InterprocessUtility.h"
#include "SharedQueue.h"
std::string InterprocessDataManager::m_sharedArgumentQueueName = "coati_parser_arguments";
std::string InterprocessDataManager::m_sharedArgumentQueueName = "sourcetrail_parser_arguments";
InterprocessDataManager::InterprocessDataManager(const bool isOwner)
: m_isOwner(isOwner)
@@ -35,9 +35,9 @@ protected:
std::string m_containerName;
};
const std::string SharedContainer::m_memoryNamePrefix("coati_memory_");
const std::string SharedContainer::m_memoryNamePrefix("sourcetrail_memory_");
const std::string SharedContainer::m_containerNamePrefix("coati_container_");
const std::string SharedContainer::m_containerNamePrefix("sourcetrail_container_");
std::string SharedContainer::getMemoryNamePrefix()
{
+1 -1
View File
@@ -31,7 +31,7 @@ void LogManager::setLoggingEnabled(bool enabled)
{
if (enabled)
{
LOG_INFO("Enabled logging for Coati " + Version::getApplicationVersion().toDisplayString());
LOG_INFO("Enabled logging for Sourcetrail " + Version::getApplicationVersion().toDisplayString());
MessageStatus("Enabled console and file logging.").dispatch();
}
else