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:
@@ -3,6 +3,7 @@
|
||||
#include "utility/logging/logging.h"
|
||||
#include "utility/messaging/type/MessageActivateTokens.h"
|
||||
#include "utility/messaging/type/MessageFlushUpdates.h"
|
||||
#include "utility/utility.h"
|
||||
|
||||
#include "component/view/UndoRedoView.h"
|
||||
#include "data/access/StorageAccess.h"
|
||||
@@ -52,10 +53,26 @@ void UndoRedoController::handleMessage(MessageActivateFile* message)
|
||||
processCommand(command);
|
||||
}
|
||||
|
||||
void UndoRedoController::handleMessage(MessageActivateLocalSymbols* message)
|
||||
{
|
||||
if (m_lastCommand.message &&
|
||||
m_lastCommand.message->getType() == message->getType() &&
|
||||
utility::isPermutation(
|
||||
message->symbolIds,
|
||||
static_cast<MessageActivateLocalSymbols*>(m_lastCommand.message.get())->symbolIds)
|
||||
)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Command command(std::make_shared<MessageActivateLocalSymbols>(*message), 1);
|
||||
processCommand(command);
|
||||
}
|
||||
|
||||
void UndoRedoController::handleMessage(MessageActivateNodes* message)
|
||||
{
|
||||
if (m_lastCommand.message &&
|
||||
m_lastCommand.message->getType() == message->getType() &&
|
||||
if (m_lastCommand.message &&
|
||||
m_lastCommand.message->getType() == message->getType() &&
|
||||
message->nodes.size() &&
|
||||
static_cast<MessageActivateNodes*>(m_lastCommand.message.get())->nodes.size() == message->nodes.size() &&
|
||||
static_cast<MessageActivateNodes*>(m_lastCommand.message.get())->nodes[0].nameHierarchy.getQualifiedNameWithSignature() ==
|
||||
|
||||
Reference in New Issue
Block a user