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.
This commit is contained in:
Eberhard Graether
2015-01-15 19:38:19 +01:00
parent 7596c699d6
commit bdb38acbce
38 changed files with 660 additions and 151 deletions
+10 -7
View File
@@ -9,31 +9,34 @@
#include "utility/types.h"
class QtCodeFileList;
class QtCodeSnippet;
class TokenLocationFile;
class QtCodeFile : public QWidget
{
public:
QtCodeFile(const std::string& filePath, QWidget *parent = 0);
QtCodeFile(const std::string& filePath, QtCodeFileList* parent);
virtual ~QtCodeFile();
const std::string& getFilePath() const;
std::string getFileName() const;
const std::vector<Id>& getActiveTokenIds() const;
const std::vector<std::string>& getErrorMessages() const;
void addCodeSnippet(
uint startLineNumber,
const std::string& code,
const TokenLocationFile& locationFile,
const std::vector<Id>& activeTokenIds
const TokenLocationFile& locationFile
);
void setActiveTokenIds(const std::vector<Id>& activeTokenIds);
void setShowMaximizeButton(bool show);
void update();
private:
std::vector<std::shared_ptr<QtCodeSnippet> > m_snippets;
QtCodeFileList* m_parent;
std::vector<std::shared_ptr<QtCodeSnippet>> m_snippets;
const std::string m_filePath;
bool m_showMaximizeButton;
};
#endif // QT_CODE_FILE_H