2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2013-12-10 14:37:32 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2013-12-10 14:37:32 +01:00
|
|
|
|
2021-08-30 10:58:08 +02:00
|
|
|
#include <cppeditor/builtineditordocumentprocessor.h>
|
2013-12-10 14:37:32 +01:00
|
|
|
|
2020-06-26 13:59:38 +02:00
|
|
|
#include <utils/id.h>
|
|
|
|
|
|
2013-12-10 14:37:32 +01:00
|
|
|
namespace ClangCodeModel {
|
2015-05-08 15:48:17 +02:00
|
|
|
namespace Internal {
|
|
|
|
|
|
2022-04-28 17:42:53 +02:00
|
|
|
class ClangEditorDocumentProcessor : public CppEditor::BuiltinEditorDocumentProcessor
|
2013-12-10 14:37:32 +01:00
|
|
|
{
|
2014-08-19 15:59:29 +02:00
|
|
|
Q_OBJECT
|
2013-12-10 14:37:32 +01:00
|
|
|
|
2014-08-19 15:59:29 +02:00
|
|
|
public:
|
2022-04-28 17:15:39 +02:00
|
|
|
ClangEditorDocumentProcessor(TextEditor::TextDocument *document);
|
2013-12-10 14:37:32 +01:00
|
|
|
|
2015-06-19 14:43:41 +02:00
|
|
|
void semanticRehighlight() override;
|
2013-12-10 14:37:32 +01:00
|
|
|
|
2015-09-28 15:15:25 +02:00
|
|
|
bool hasProjectPart() const;
|
2021-08-30 10:58:08 +02:00
|
|
|
CppEditor::ProjectPart::ConstPtr projectPart() const;
|
2015-09-18 12:19:46 +02:00
|
|
|
void clearProjectPart();
|
2015-07-14 19:01:32 +02:00
|
|
|
|
2020-06-26 13:59:38 +02:00
|
|
|
::Utils::Id diagnosticConfigId() const;
|
2018-01-19 16:57:18 +01:00
|
|
|
|
2021-08-30 10:58:08 +02:00
|
|
|
void setParserConfig(const CppEditor::BaseEditorDocumentParser::Configuration &config) override;
|
2022-04-28 17:42:53 +02:00
|
|
|
CppEditor::BaseEditorDocumentParser::Configuration parserConfig();
|
2017-05-24 13:23:01 +02:00
|
|
|
|
2015-07-14 19:01:32 +02:00
|
|
|
public:
|
2022-11-23 19:00:38 +01:00
|
|
|
static ClangEditorDocumentProcessor *get(const Utils::FilePath &filePath);
|
2015-07-14 19:01:32 +02:00
|
|
|
|
2018-03-22 13:05:59 +01:00
|
|
|
signals:
|
2022-02-08 11:49:37 +01:00
|
|
|
void parserConfigChanged(const Utils::FilePath &filePath,
|
|
|
|
|
const CppEditor::BaseEditorDocumentParser::Configuration &config);
|
2018-03-22 13:05:59 +01:00
|
|
|
|
2015-08-31 16:28:26 +02:00
|
|
|
private:
|
2017-06-09 12:19:09 +02:00
|
|
|
TextEditor::TextDocument &m_document;
|
2021-08-30 10:58:08 +02:00
|
|
|
CppEditor::ProjectPart::ConstPtr m_projectPart;
|
2020-06-26 13:59:38 +02:00
|
|
|
::Utils::Id m_diagnosticConfigId;
|
2013-12-10 14:37:32 +01:00
|
|
|
};
|
|
|
|
|
|
2015-05-08 15:48:17 +02:00
|
|
|
} // namespace Internal
|
2013-12-10 14:37:32 +01:00
|
|
|
} // namespace ClangCodeModel
|