logic: Refactored Code View to process all contents in one update
* Use unified showCodeSnippets method for setting file information on CodeView * Made async initial file and snippet expansion synced * Add ScrollParams API to CodeView * Regard scope size when scrolling to definition * Only use QtThreadedLambdaFunctor in QtCodeView now
This commit is contained in:
@@ -10,7 +10,6 @@ public:
|
||||
MessageBase()
|
||||
: m_isParallel(false)
|
||||
, m_isReplayed(false)
|
||||
, m_isReplayCleared(false)
|
||||
, m_sendAsTask(true)
|
||||
, m_keepContent(false)
|
||||
, m_isLast(true)
|
||||
@@ -55,16 +54,6 @@ public:
|
||||
m_isReplayed = isReplayed;
|
||||
}
|
||||
|
||||
bool isReplayCleared() const
|
||||
{
|
||||
return m_isReplayCleared;
|
||||
}
|
||||
|
||||
void setIsReplayCleared(bool isReplayCleared)
|
||||
{
|
||||
m_isReplayCleared = isReplayCleared;
|
||||
}
|
||||
|
||||
bool isLast() const
|
||||
{
|
||||
return m_isLast;
|
||||
@@ -107,9 +96,7 @@ public:
|
||||
|
||||
private:
|
||||
bool m_isParallel;
|
||||
|
||||
bool m_isReplayed;
|
||||
bool m_isReplayCleared;
|
||||
|
||||
bool m_sendAsTask;
|
||||
bool m_keepContent;
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#ifndef MESSAGE_CODE_VIEW_EXPANDED_INITIAL_FILES_H
|
||||
#define MESSAGE_CODE_VIEW_EXPANDED_INITIAL_FILES_H
|
||||
|
||||
#include "utility/messaging/Message.h"
|
||||
|
||||
class MessageCodeViewExpandedInitialFiles
|
||||
: public Message<MessageCodeViewExpandedInitialFiles>
|
||||
{
|
||||
public:
|
||||
MessageCodeViewExpandedInitialFiles(bool scrollToDefinition)
|
||||
: scrollToDefinition(scrollToDefinition)
|
||||
{
|
||||
}
|
||||
|
||||
static const std::string getStaticType()
|
||||
{
|
||||
return "MessageCodeViewExpandedInitialFiles";
|
||||
}
|
||||
|
||||
bool scrollToDefinition;
|
||||
};
|
||||
|
||||
#endif // MESSAGE_CODE_VIEW_EXPANDED_INITIAL_FILES_H
|
||||
@@ -1,17 +1,16 @@
|
||||
#ifndef MESSAGE_SCROLL_TO_LINE_h
|
||||
#define MESSAGE_SCROLL_TO_LINE_h
|
||||
#ifndef MESSAGE_SCROLL_TO_LINE_H
|
||||
#define MESSAGE_SCROLL_TO_LINE_H
|
||||
|
||||
#include "utility/messaging/Message.h"
|
||||
#include "utility/file/FilePath.h"
|
||||
#include "utility/messaging/Message.h"
|
||||
|
||||
class MessageScrollToLine
|
||||
: public Message<MessageScrollToLine>
|
||||
{
|
||||
public:
|
||||
MessageScrollToLine(const FilePath& filePath, unsigned int line, bool isModified = false)
|
||||
MessageScrollToLine(const FilePath& filePath, size_t line)
|
||||
: filePath(filePath)
|
||||
, line(line)
|
||||
, isModified(isModified)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -21,8 +20,7 @@ public:
|
||||
}
|
||||
|
||||
const FilePath filePath;
|
||||
unsigned int line;
|
||||
bool isModified;
|
||||
size_t line;
|
||||
};
|
||||
|
||||
#endif // MESSAGE_SCROLL_TO_LINE_h
|
||||
#endif // MESSAGE_SCROLL_TO_LINE_H
|
||||
|
||||
@@ -8,11 +8,11 @@ class MessageShowReference
|
||||
: public Message<MessageShowReference>
|
||||
{
|
||||
public:
|
||||
MessageShowReference(size_t refIndex, Id tokenId, Id locationId, bool animated)
|
||||
MessageShowReference(size_t refIndex, Id tokenId, Id locationId, bool fromUser)
|
||||
: refIndex(refIndex)
|
||||
, tokenId(tokenId)
|
||||
, locationId(locationId)
|
||||
, animated(animated)
|
||||
, fromUser(fromUser)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
const size_t refIndex;
|
||||
const Id tokenId;
|
||||
const Id locationId;
|
||||
const bool animated;
|
||||
const bool fromUser;
|
||||
};
|
||||
|
||||
#endif // MESSAGE_SHOW_REFERENCE_H
|
||||
|
||||
Reference in New Issue
Block a user