logic: code controller

- Renamed MessageActivateTokenLocation to MessageActivateToken, since it uses the Token id (not the TokenLocation id).
- Implemented CodeController to add one snippet for each location where the activated token occurred.
- Added Semaphore to QtThreadedFunctor to prevent an evil race-condition.
- CodeView dispatches message when a token is clicked.
This commit is contained in:
malte_langkabel
2014-07-03 16:03:06 +02:00
parent 4c7bbbe28e
commit 4ae6f4a04a
17 changed files with 183 additions and 44 deletions
+10 -3
View File
@@ -10,7 +10,10 @@
#include "data/location/TokenLocationCollection.h"
#include "data/parser/ParserClient.h"
class Storage: public ParserClient, public GraphAccess, public LocationAccess
class Storage
: public ParserClient
, public GraphAccess
, public LocationAccess
{
public:
Storage();
@@ -42,8 +45,12 @@ public:
void logGraph() const;
void logLocations() const;
virtual Token* getToken(Id tokenId);
virtual TokenLocation* getTokenLocation(Id locationId);
virtual Token* getToken(Id tokenId) const;
virtual TokenLocationCollection getTokenLocationsForTokenId(Id locationId) const;
virtual TokenLocationFile getTokenLocationsForLinesInFile(
const std::string& fileName, unsigned int firstLineNumber, unsigned int lastLineNumber
) const;
private:
Edge::AccessType convertAccessType(ParserClient::AccessType access) const;