ui: clicking snippet title to show full scope
This change lets the user click the snippet title in the CodeView to insert the full scope. The existing snippets are merged with the new lines accordingly.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
CodeView::CodeSnippetParams::CodeSnippetParams()
|
||||
: startLineNumber(0)
|
||||
, endLineNumber(0)
|
||||
, lineCount(0)
|
||||
, titleId(0)
|
||||
, locationFile(std::make_shared<TokenLocationFile>(""))
|
||||
, isActive(false)
|
||||
, isDeclaration(false)
|
||||
|
||||
@@ -21,11 +21,12 @@ public:
|
||||
|
||||
uint startLineNumber;
|
||||
uint endLineNumber;
|
||||
uint lineCount;
|
||||
|
||||
std::string title;
|
||||
std::string code;
|
||||
|
||||
Id titleId;
|
||||
|
||||
std::shared_ptr<TokenLocationFile> locationFile;
|
||||
|
||||
bool isActive;
|
||||
@@ -41,6 +42,7 @@ public:
|
||||
virtual void setErrorMessages(const std::vector<std::string>& errorMessages) = 0;
|
||||
|
||||
virtual void showCodeSnippets(const std::vector<CodeSnippetParams>& snippets) = 0;
|
||||
virtual void addCodeSnippet(const CodeSnippetParams& snippet) = 0;
|
||||
virtual void showCodeFile(const CodeSnippetParams& params) = 0;
|
||||
|
||||
virtual void scrollToFirstActiveSnippet() = 0;
|
||||
|
||||
Reference in New Issue
Block a user