src: extract NoteType::Type to NodeKind (#925)

This commit is contained in:
Malte Langkabel
2020-02-14 20:35:02 +01:00
committed by GitHub
parent a30f47e27f
commit 437f06d21b
34 changed files with 577 additions and 600 deletions
@@ -173,7 +173,8 @@ void UndoRedoController::handleMessage(MessageCodeShowDefinition* message)
void UndoRedoController::handleMessage(MessageDeactivateEdge* message)
{
if (sameMessageTypeAsLast(message) &&
static_cast<MessageDeactivateEdge*>(lastMessage())->scrollToDefinition == message->scrollToDefinition)
static_cast<MessageDeactivateEdge*>(lastMessage())->scrollToDefinition ==
message->scrollToDefinition)
{
return;
}
@@ -493,15 +494,15 @@ void UndoRedoController::replayCommand(std::list<Command>::iterator it)
for (SearchMatch match: matches)
{
// TODO: replace duplicate main definition fix with better solution
if (match.nodeType.getType() != NodeType::NODE_FUNCTION ||
!match.tokenNames.size() || match.tokenNames[0].getRawName() != L"main")
if (match.nodeType.getKind() != NODE_FUNCTION || !match.tokenNames.size() ||
match.tokenNames[0].getRawName() != L"main")
{
match.tokenIds = m_storageAccess->getNodeIdsForNameHierarchies(match.tokenNames);
}
if (!match.tokenIds.size())
{
match.nodeType = NodeType::NODE_SYMBOL;
match.nodeType = NodeType(NODE_SYMBOL);
}
utility::append(msg->tokenIds, match.tokenIds);