data: showing local symbols
- added local symbols to storage - added tests for local symbol parsing - added MessageActivateLocalSymbols to activate local symbols in code view - TokenLocations now store their LocationType instead of a plain bool "isScope" - moved LocationType from TokenLocation to separate file, since it is also used in Annotations now. - added local_symbol in stylesheet to define a style for hovering and activating these elements - renamed location to token in stylesheet
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
#ifndef MESSAGE_ACTIVATE_LOCAL_SYMBOLS_H
|
||||
#define MESSAGE_ACTIVATE_LOCAL_SYMBOLS_H
|
||||
|
||||
#include "utility/messaging/Message.h"
|
||||
#include "utility/types.h"
|
||||
|
||||
class MessageActivateLocalSymbols
|
||||
: public Message<MessageActivateLocalSymbols>
|
||||
{
|
||||
public:
|
||||
MessageActivateLocalSymbols()
|
||||
{
|
||||
}
|
||||
|
||||
MessageActivateLocalSymbols(const std::vector<Id>& symbolIds)
|
||||
: symbolIds(symbolIds)
|
||||
{
|
||||
}
|
||||
|
||||
void addSymbol(Id symbolId)
|
||||
{
|
||||
symbolIds.push_back(symbolId);
|
||||
}
|
||||
|
||||
static const std::string getStaticType()
|
||||
{
|
||||
return "MessageActivateLocalSymbols";
|
||||
}
|
||||
|
||||
virtual void print(std::ostream& os) const
|
||||
{
|
||||
for (const Id& symbolId : symbolIds)
|
||||
{
|
||||
os << symbolId << " ";
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<Id> symbolIds;
|
||||
};
|
||||
|
||||
#endif // MESSAGE_ACTIVATE_LOCAL_SYMBOLS_H
|
||||
Reference in New Issue
Block a user