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:
@@ -0,0 +1,32 @@
|
||||
#ifndef REFRESH_CONTROLLER_H
|
||||
#define REFRESH_CONTROLLER_H
|
||||
|
||||
#include "component/controller/Controller.h"
|
||||
#include "utility/messaging/MessageListener.h"
|
||||
#include "utility/messaging/type/MessageAutoRefreshChanged.h"
|
||||
#include "utility/messaging/type/MessageRefresh.h"
|
||||
#include "utility/messaging/type/MessageWindowFocus.h"
|
||||
|
||||
class RefreshView;
|
||||
|
||||
class RefreshController
|
||||
: public Controller
|
||||
, public MessageListener<MessageAutoRefreshChanged>
|
||||
, public MessageListener<MessageRefresh>
|
||||
, public MessageListener<MessageWindowFocus>
|
||||
{
|
||||
public:
|
||||
RefreshController();
|
||||
virtual ~RefreshController();
|
||||
|
||||
private:
|
||||
virtual void handleMessage(MessageAutoRefreshChanged* message);
|
||||
virtual void handleMessage(MessageRefresh* message);
|
||||
virtual void handleMessage(MessageWindowFocus* message);
|
||||
|
||||
RefreshView* getView();
|
||||
|
||||
bool m_autoRefreshEnabled;
|
||||
};
|
||||
|
||||
#endif // REFRESH_CONTROLLER_H
|
||||
Reference in New Issue
Block a user