Files
Sourcetrail/src/lib/component/view/CodeView.h
T
Eberhard Graether bdb38acbce ui/logic/data: show parse errors in CodeView
This change saves the errors while parsing in the Storage and displays them in the CodeView. The error messages can be
read in the tooltip on hovering. The error count is visible in the status bar.
2015-01-15 19:38:19 +01:00

48 lines
1019 B
C++

#ifndef CODE_VIEW_H
#define CODE_VIEW_H
#include "component/view/View.h"
#include "data/location/TokenLocationFile.h"
#include "utility/types.h"
class CodeController;
class CodeView: public View
{
public:
struct CodeSnippetParams
{
CodeSnippetParams();
// comparefunction for snippetsorting
static bool sort(const CodeSnippetParams& a, const CodeSnippetParams& b);
uint startLineNumber;
uint endLineNumber;
uint lineCount;
std::string code;
TokenLocationFile locationFile;
bool isActive;
bool isDeclaration;
};
CodeView(ViewLayout* viewLayout);
virtual ~CodeView();
virtual std::string getName() const;
virtual void setActiveTokenIds(const std::vector<Id>& activeTokenIds) = 0;
virtual void setErrorMessages(const std::vector<std::string>& errorMessages) = 0;
virtual void showCodeSnippets(const std::vector<CodeSnippetParams>& snippets) = 0;
virtual void showCodeFile(const CodeSnippetParams& params) = 0;
private:
CodeController* getController();
};
#endif // CODE_VIEW_H