ui/logic/data: refreshing only source files that have been updated

This change adds the refresh component that allows for refreshing the source code via UI or shortcut. If automatic
refreshing is activated via the UI, the code is refreshed anytime the window gets focus. The contents of all the
updated source files get removed from Storage, before reparsing them. File dependencies are not respected yet.
This commit is contained in:
Eberhard Graether
2015-02-03 14:27:39 +01:00
parent e17341fc43
commit 1690479b0e
52 changed files with 1145 additions and 92 deletions
@@ -0,0 +1,22 @@
#ifndef MESSAGE_AUTO_REFRESH_CHANGED_H
#define MESSAGE_AUTO_REFRESH_CHANGED_H
#include "utility/messaging/Message.h"
class MessageAutoRefreshChanged: public Message<MessageAutoRefreshChanged>
{
public:
MessageAutoRefreshChanged(bool enabled)
: enabled(enabled)
{
}
static const std::string getStaticType()
{
return "MessageAutoRefreshChanged";
}
bool enabled;
};
#endif // MESSAGE_AUTO_REFRESH_CHANGED_H
@@ -6,8 +6,9 @@
class MessageFinishedParsing: public Message<MessageFinishedParsing>
{
public:
MessageFinishedParsing(float parseTime, size_t errorCount)
: parseTime(parseTime)
MessageFinishedParsing(size_t fileCount, float parseTime, size_t errorCount)
: fileCount(fileCount)
, parseTime(parseTime)
, errorCount(errorCount)
{
}
@@ -17,6 +18,7 @@ public:
return "MessageFinishedParsing";
}
size_t fileCount;
float parseTime;
size_t errorCount;
};
@@ -2,7 +2,6 @@
#define MESSAGE_REFRESH_H
#include "utility/messaging/Message.h"
#include "utility/types.h"
class MessageRefresh: public Message<MessageRefresh>
{
@@ -0,0 +1,19 @@
#ifndef MESSAGE_WINDOW_FOCUS_H
#define MESSAGE_WINDOW_FOCUS_H
#include "utility/messaging/Message.h"
class MessageWindowFocus: public Message<MessageWindowFocus>
{
public:
MessageWindowFocus()
{
}
static const std::string getStaticType()
{
return "MessageWindowFocus";
}
};
#endif // MESSAGE_WINDOW_FOCUS_H