logic: Refactored undo redo stack

* Store MessageActivateTokens instead of original view messages
* Renamed FeatureController to ActivationController
* Remove all non-activation messages from undo redo stack after reindexing project
* Added MessageShowReference to undo redo stack
* Added MessageScrollGraph for restoring graph view scroll position
* Fixed MessageGraphNodeMove not saved for bundles
* Refactored tokenIds and nodeNames in SearchMatch and MessageActivateTokens
* Refactored SearchController
* Fixed file expansion on undoing/redoing after switching code view mode
* Fixed redundant graph animation due to present qualifier nodes
* Fixed no restoring of graph node expansion when showing overview in between
This commit is contained in:
Eberhard Graether
2017-03-16 23:24:33 +01:00
parent aa49fffca6
commit 630009a2ba
44 changed files with 516 additions and 400 deletions
+5
View File
@@ -11,6 +11,7 @@
#include "utility/messaging/MessageListener.h"
#include "utility/messaging/type/MessageCodeReference.h"
#include "utility/messaging/type/MessageFinishedParsing.h"
#include "utility/messaging/type/MessageShowReference.h"
#include "utility/messaging/type/MessageSwitchColorScheme.h"
#include "utility/messaging/type/MessageWindowFocus.h"
@@ -23,6 +24,7 @@ class QtCodeNavigator
: public QWidget
, public MessageListener<MessageCodeReference>
, public MessageListener<MessageFinishedParsing>
, public MessageListener<MessageShowReference>
, public MessageListener<MessageSwitchColorScheme>
, public MessageListener<MessageWindowFocus>
{
@@ -62,6 +64,8 @@ public:
bool hasErrors() const;
size_t getFatalErrorCountForFile(const FilePath& filePath) const;
bool isInListMode() const;
void showActiveSnippet(
const std::vector<Id>& activeTokenIds, std::shared_ptr<TokenLocationCollection> collection, bool scrollTo);
@@ -147,6 +151,7 @@ private:
void handleMessage(MessageCodeReference* message);
void handleMessage(MessageFinishedParsing* message);
void handleMessage(MessageShowReference* message);
void handleMessage(MessageSwitchColorScheme* message);
void handleMessage(MessageWindowFocus* message);