logic: More fixes for release

* Fixed crash on undoing aggregation edge
* Avoid mutex locking in logging classes when logging is disabled
* Readded dark color scheme
* Fixed font size of type label in autocompletion list
* Fixed text drawing in autocompletion list
* Only give camelcase score when no noletter score was given
* Added MessageShowErrors to undo stack
* Select error line in table when undoing MessageShowErrors
* Notify user about new Plugin in description of From Visual Studio project setup
* Fixed row height of Project File Location label in project setup
This commit is contained in:
Eberhard Graether
2016-10-14 00:45:37 +02:00
parent 2dc9995cc1
commit 30d222b7db
19 changed files with 626 additions and 137 deletions
+24 -7
View File
@@ -4,9 +4,8 @@
#include "utility/logging/LogMessage.h"
std::shared_ptr<LogManager> LogManager::getInstance()
std::shared_ptr<LogManager> LogManager::createInstance()
{
std::lock_guard<std::mutex> lockGuard(s_instanceMutex);
if (s_instance.use_count() == 0)
{
s_instance = std::shared_ptr<LogManager>(new LogManager());
@@ -14,9 +13,13 @@ std::shared_ptr<LogManager> LogManager::getInstance()
return s_instance;
}
std::shared_ptr<LogManager> LogManager::getInstance()
{
return s_instance;
}
void LogManager::destroyInstance()
{
std::lock_guard<std::mutex> lockGuard(s_instanceMutex);
s_instance.reset();
}
@@ -24,6 +27,11 @@ LogManager::~LogManager()
{
}
void LogManager::setLoggingEnabled(bool enabled)
{
m_loggingEnabled = enabled;
}
void LogManager::addLogger(std::shared_ptr<Logger> logger)
{
m_logManagerImplementation.addLogger(logger);
@@ -56,7 +64,10 @@ void LogManager::logInfo(
const unsigned int line
)
{
m_logManagerImplementation.logInfo(message, file, function, line);
if (m_loggingEnabled)
{
m_logManagerImplementation.logInfo(message, file, function, line);
}
}
void LogManager::logWarning(
@@ -66,7 +77,10 @@ void LogManager::logWarning(
const unsigned int line
)
{
m_logManagerImplementation.logWarning(message, file, function, line);
if (m_loggingEnabled)
{
m_logManagerImplementation.logWarning(message, file, function, line);
}
}
void LogManager::logError(
@@ -76,12 +90,15 @@ void LogManager::logError(
const unsigned int line
)
{
m_logManagerImplementation.logError(message, file, function, line);
if (m_loggingEnabled)
{
m_logManagerImplementation.logError(message, file, function, line);
}
}
std::shared_ptr<LogManager> LogManager::s_instance;
std::mutex LogManager::s_instanceMutex;
LogManager::LogManager()
: m_loggingEnabled(false)
{
}
+4 -2
View File
@@ -2,7 +2,6 @@
#define LOG_MANAGER_H
#include <memory>
#include <mutex>
#include "utility/logging/Logger.h"
#include "utility/logging/LogManagerImplementation.h"
@@ -10,11 +9,14 @@
class LogManager
{
public:
static std::shared_ptr<LogManager> createInstance();
static std::shared_ptr<LogManager> getInstance();
static void destroyInstance();
~LogManager();
void setLoggingEnabled(bool enabled);
void addLogger(std::shared_ptr<Logger> logger);
void removeLogger(std::shared_ptr<Logger> logger);
void removeLoggersByType(const std::string& type);
@@ -42,13 +44,13 @@ public:
private:
static std::shared_ptr<LogManager> s_instance;
static std::mutex s_instanceMutex;
LogManager();
LogManager(const LogManager&);
void operator=(const LogManager&);
LogManagerImplementation m_logManagerImplementation;
bool m_loggingEnabled;
};
#endif // LOG_MANAGER_H
@@ -17,7 +17,10 @@ public:
, fromNameHierarchy(fromName)
, toNameHierarchy(toName)
{
setKeepContent(true);
if (!isAggregation())
{
setKeepContent(true);
}
}
static const std::string getStaticType()
@@ -270,7 +270,10 @@ std::string SolutionParserVisualStudio::getButtonText() const
std::string SolutionParserVisualStudio::getDescription() const
{
return "Create a new project from an existing Visual Studio Solution file. <b>Unstable!</b>";
return "Create a new project from an existing Visual Studio Solution file. "
"<b>Unstable: Please install our new <a href=\"https://coati.io/documentation/index.html#VisualStudio\">Visual "
"Studio plugin</a> and use the \"Create CDB\" menu option, then continue with project setup from "
"Compilation Database.</b>";
}
std::string SolutionParserVisualStudio::getIconPath() const