ui: scope names in snippet titles
* added title for snippets * title displays name of parent scope. * when new TokenLocationFiles are created in the storage they are now returned as shared_ptr to ensure correct linking in the contained data. * Storage::getTokenLocationsForLinesInFile() now always returns pairs of start and end locations. * Adjusted code snippet view to regard the change described above.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#include "component/controller/helper/SnippetMerger.h"
|
||||
#include "component/controller/Controller.h"
|
||||
#include "component/view/CodeView.h"
|
||||
#include "utility/messaging/MessageListener.h"
|
||||
@@ -14,10 +15,6 @@
|
||||
#include "utility/messaging/type/MessageShowFile.h"
|
||||
#include "utility/types.h"
|
||||
|
||||
|
||||
|
||||
#include "component/controller/helper/SnippetMerger.h"
|
||||
|
||||
class StorageAccess;
|
||||
class TokenLocationFile;
|
||||
|
||||
@@ -46,7 +43,7 @@ private:
|
||||
|
||||
std::vector<CodeView::CodeSnippetParams> getSnippetsForActiveTokenIds(
|
||||
const std::vector<Id>& ids, Id declarationId) const;
|
||||
std::vector<CodeView::CodeSnippetParams> getSnippetsForFile(const TokenLocationFile* file) const;
|
||||
std::vector<CodeView::CodeSnippetParams> getSnippetsForFile(std::shared_ptr<TokenLocationFile> file) const;
|
||||
std::shared_ptr<SnippetMerger> buildMergerHierarchy(
|
||||
TokenLocation* location, SnippetMerger& fileScopedMerger, std::map<int, std::shared_ptr<SnippetMerger>>& mergers) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user