ui: precollapse files in code view
This change shows the files in the code view minimized, if more than 5. This greatly improves performance, because code and annotations won't get loaded until needed. Files including declarations or definitions of the active symbol are still expanded. The number of references in each file is now shown in it's title bar. Clicking the title bar allows for expanding and collapsing as well now.
This commit is contained in:
@@ -29,8 +29,11 @@ public:
|
||||
|
||||
std::shared_ptr<TokenLocationFile> locationFile;
|
||||
|
||||
uint refCount;
|
||||
|
||||
bool isActive;
|
||||
bool isDeclaration;
|
||||
bool isCollapsed;
|
||||
};
|
||||
|
||||
CodeView(ViewLayout* viewLayout);
|
||||
@@ -42,10 +45,10 @@ 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 addCodeSnippets(const std::vector<CodeSnippetParams>& snippets) = 0;
|
||||
virtual void showCodeFile(const CodeSnippetParams& params) = 0;
|
||||
|
||||
virtual void scrollToFirstActiveSnippet() = 0;
|
||||
virtual void showFirstActiveSnippet() = 0;
|
||||
|
||||
virtual void focusToken(const Id tokenId) = 0;
|
||||
virtual void defocusToken() = 0;
|
||||
|
||||
Reference in New Issue
Block a user