Commit 8f9c42c6 authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

Clang: Merge highlighting/diagnostics messages



The messages

    RequestDiagnosticsMessage
    RequestHighlightingMessage

and

    DiagnosticsChangedMessage
    HighlightingChangedMessage

are always send/received together, so merge them into

    RequestDocumentAnnotationsMessage
    DocumentAnnotationsChangedMessage

Change-Id: I6a0b6281ed1e6efe6cb18386afe99b1d1fb58abf
Reviewed-by: Marco Bubke's avatarMarco Bubke <marco.bubke@qt.io>
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@theqtcompany.com>
parent 3be096f1
...@@ -34,23 +34,21 @@ SOURCES += $$PWD/clangcodemodelserverinterface.cpp \ ...@@ -34,23 +34,21 @@ SOURCES += $$PWD/clangcodemodelserverinterface.cpp \
$$PWD/projectpartsdonotexistmessage.cpp \ $$PWD/projectpartsdonotexistmessage.cpp \
$$PWD/lineprefixer.cpp \ $$PWD/lineprefixer.cpp \
$$PWD/clangbackendipcdebugutils.cpp \ $$PWD/clangbackendipcdebugutils.cpp \
$$PWD/diagnosticschangedmessage.cpp \
$$PWD/diagnosticcontainer.cpp \ $$PWD/diagnosticcontainer.cpp \
$$PWD/sourcerangecontainer.cpp \ $$PWD/sourcerangecontainer.cpp \
$$PWD/sourcelocationcontainer.cpp \ $$PWD/sourcelocationcontainer.cpp \
$$PWD/fixitcontainer.cpp \ $$PWD/fixitcontainer.cpp \
$$PWD/requestdiagnosticsmessage.cpp \ $$PWD/requestdocumentannotations.cpp \
$$PWD/requesthighlightingmessage.cpp \
$$PWD/registerunsavedfilesforeditormessage.cpp \ $$PWD/registerunsavedfilesforeditormessage.cpp \
$$PWD/unregisterunsavedfilesforeditormessage.cpp \ $$PWD/unregisterunsavedfilesforeditormessage.cpp \
$$PWD/updatetranslationunitsforeditormessage.cpp \ $$PWD/updatetranslationunitsforeditormessage.cpp \
$$PWD/updatevisibletranslationunitsmessage.cpp \ $$PWD/updatevisibletranslationunitsmessage.cpp \
$$PWD/highlightingchangedmessage.cpp \
$$PWD/highlightingmarkcontainer.cpp \ $$PWD/highlightingmarkcontainer.cpp \
$$PWD/messageenvelop.cpp \ $$PWD/messageenvelop.cpp \
$$PWD/ipcclientinterface.cpp \ $$PWD/ipcclientinterface.cpp \
$$PWD/ipcserverinterface.cpp \ $$PWD/ipcserverinterface.cpp \
$$PWD/clangcodemodelconnectionclient.cpp $$PWD/clangcodemodelconnectionclient.cpp \
$$PWD/documentannotationschangedmessage.cpp
HEADERS += \ HEADERS += \
$$PWD/clangcodemodelserverinterface.h \ $$PWD/clangcodemodelserverinterface.h \
...@@ -80,22 +78,20 @@ HEADERS += \ ...@@ -80,22 +78,20 @@ HEADERS += \
$$PWD/clangbackendipc_global.h \ $$PWD/clangbackendipc_global.h \
$$PWD/lineprefixer.h \ $$PWD/lineprefixer.h \
$$PWD/clangbackendipcdebugutils.h \ $$PWD/clangbackendipcdebugutils.h \
$$PWD/diagnosticschangedmessage.h \
$$PWD/diagnosticcontainer.h \ $$PWD/diagnosticcontainer.h \
$$PWD/sourcerangecontainer.h \ $$PWD/sourcerangecontainer.h \
$$PWD/sourcelocationcontainer.h \ $$PWD/sourcelocationcontainer.h \
$$PWD/fixitcontainer.h \ $$PWD/fixitcontainer.h \
$$PWD/requestdiagnosticsmessage.h \ $$PWD/requestdocumentannotations.h \
$$PWD/requesthighlightingmessage.h \
$$PWD/registerunsavedfilesforeditormessage.h \ $$PWD/registerunsavedfilesforeditormessage.h \
$$PWD/unregisterunsavedfilesforeditormessage.h \ $$PWD/unregisterunsavedfilesforeditormessage.h \
$$PWD/updatetranslationunitsforeditormessage.h \ $$PWD/updatetranslationunitsforeditormessage.h \
$$PWD/updatevisibletranslationunitsmessage.h \ $$PWD/updatevisibletranslationunitsmessage.h \
$$PWD/highlightingchangedmessage.h \
$$PWD/highlightingmarkcontainer.h \ $$PWD/highlightingmarkcontainer.h \
$$PWD/messageenvelop.h \ $$PWD/messageenvelop.h \
$$PWD/ipcclientinterface.h \ $$PWD/ipcclientinterface.h \
$$PWD/ipcserverinterface.h \ $$PWD/ipcserverinterface.h \
$$PWD/clangcodemodelconnectionclient.h $$PWD/clangcodemodelconnectionclient.h \
$$PWD/documentannotationschangedmessage.h
contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
...@@ -97,11 +97,8 @@ enum class MessageType : quint8 { ...@@ -97,11 +97,8 @@ enum class MessageType : quint8 {
RegisterProjectPartsForEditorMessage, RegisterProjectPartsForEditorMessage,
UnregisterProjectPartsForEditorMessage, UnregisterProjectPartsForEditorMessage,
RequestDiagnosticsMessage, RequestDocumentAnnotationsMessage,
DiagnosticsChangedMessage, DocumentAnnotationsChangedMessage,
RequestHighlightingMessage,
HighlightingChangedMessage,
UpdateVisibleTranslationUnitsMessage, UpdateVisibleTranslationUnitsMessage,
......
...@@ -27,11 +27,10 @@ ...@@ -27,11 +27,10 @@
#include "cmbcodecompletedmessage.h" #include "cmbcodecompletedmessage.h"
#include "cmbechomessage.h" #include "cmbechomessage.h"
#include "documentannotationschangedmessage.h"
#include "messageenvelop.h" #include "messageenvelop.h"
#include "projectpartsdonotexistmessage.h" #include "projectpartsdonotexistmessage.h"
#include "translationunitdoesnotexistmessage.h" #include "translationunitdoesnotexistmessage.h"
#include "diagnosticschangedmessage.h"
#include "highlightingchangedmessage.h"
#include <QDebug> #include <QDebug>
#include <QVariant> #include <QVariant>
...@@ -56,11 +55,8 @@ void ClangCodeModelClientInterface::dispatch(const MessageEnvelop &messageEnvelo ...@@ -56,11 +55,8 @@ void ClangCodeModelClientInterface::dispatch(const MessageEnvelop &messageEnvelo
case MessageType::ProjectPartsDoNotExistMessage: case MessageType::ProjectPartsDoNotExistMessage:
projectPartsDoNotExist(messageEnvelop.message<ProjectPartsDoNotExistMessage>()); projectPartsDoNotExist(messageEnvelop.message<ProjectPartsDoNotExistMessage>());
break; break;
case MessageType::DiagnosticsChangedMessage: case MessageType::DocumentAnnotationsChangedMessage:
diagnosticsChanged(messageEnvelop.message<DiagnosticsChangedMessage>()); documentAnnotationsChanged(messageEnvelop.message<DocumentAnnotationsChangedMessage>());
break;
case MessageType::HighlightingChangedMessage:
highlightingChanged(messageEnvelop.message<HighlightingChangedMessage>());
break; break;
default: default:
qWarning() << "Unknown ClangCodeModelClientMessage"; qWarning() << "Unknown ClangCodeModelClientMessage";
......
...@@ -40,13 +40,11 @@ class CompleteCodeMessage; ...@@ -40,13 +40,11 @@ class CompleteCodeMessage;
class CodeCompletedMessage; class CodeCompletedMessage;
class TranslationUnitDoesNotExistMessage; class TranslationUnitDoesNotExistMessage;
class ProjectPartsDoNotExistMessage; class ProjectPartsDoNotExistMessage;
class DiagnosticsChangedMessage;
class RequestDiagnosticsMessage;
class RegisterUnsavedFilesForEditorMessage; class RegisterUnsavedFilesForEditorMessage;
class UnregisterUnsavedFilesForEditorMessage; class UnregisterUnsavedFilesForEditorMessage;
class UpdateVisibleTranslationUnitsMessage; class UpdateVisibleTranslationUnitsMessage;
class RequestHighlightingMessage; class RequestDocumentAnnotationsMessage;
class HighlightingChangedMessage; class DocumentAnnotationsChangedMessage;
class CMBIPC_EXPORT ClangCodeModelClientInterface : public IpcClientInterface class CMBIPC_EXPORT ClangCodeModelClientInterface : public IpcClientInterface
{ {
...@@ -58,8 +56,7 @@ public: ...@@ -58,8 +56,7 @@ public:
virtual void codeCompleted(const CodeCompletedMessage &message) = 0; virtual void codeCompleted(const CodeCompletedMessage &message) = 0;
virtual void translationUnitDoesNotExist(const TranslationUnitDoesNotExistMessage &message) = 0; virtual void translationUnitDoesNotExist(const TranslationUnitDoesNotExistMessage &message) = 0;
virtual void projectPartsDoNotExist(const ProjectPartsDoNotExistMessage &message) = 0; virtual void projectPartsDoNotExist(const ProjectPartsDoNotExistMessage &message) = 0;
virtual void diagnosticsChanged(const DiagnosticsChangedMessage &message) = 0; virtual void documentAnnotationsChanged(const DocumentAnnotationsChangedMessage &message) = 0;
virtual void highlightingChanged(const HighlightingChangedMessage &message) = 0;
}; };
} // namespace ClangBackEnd } // namespace ClangBackEnd
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
#include "cmbcodecompletedmessage.h" #include "cmbcodecompletedmessage.h"
#include "cmbechomessage.h" #include "cmbechomessage.h"
#include "cmbregistertranslationunitsforeditormessage.h" #include "cmbregistertranslationunitsforeditormessage.h"
#include "diagnosticschangedmessage.h" #include "documentannotationschangedmessage.h"
#include "highlightingchangedmessage.h"
#include "clangcodemodelserverinterface.h" #include "clangcodemodelserverinterface.h"
#include "ipcserverinterface.h"
#include "messageenvelop.h" #include "messageenvelop.h"
#include "projectpartsdonotexistmessage.h" #include "projectpartsdonotexistmessage.h"
#include "translationunitdoesnotexistmessage.h" #include "translationunitdoesnotexistmessage.h"
...@@ -96,12 +96,7 @@ void ClangCodeModelClientProxy::projectPartsDoNotExist(const ProjectPartsDoNotEx ...@@ -96,12 +96,7 @@ void ClangCodeModelClientProxy::projectPartsDoNotExist(const ProjectPartsDoNotEx
writeMessageBlock.write(message); writeMessageBlock.write(message);
} }
void ClangCodeModelClientProxy::diagnosticsChanged(const DiagnosticsChangedMessage &message) void ClangCodeModelClientProxy::documentAnnotationsChanged(const DocumentAnnotationsChangedMessage &message)
{
writeMessageBlock.write(message);
}
void ClangCodeModelClientProxy::highlightingChanged(const HighlightingChangedMessage &message)
{ {
writeMessageBlock.write(message); writeMessageBlock.write(message);
} }
......
...@@ -56,8 +56,7 @@ public: ...@@ -56,8 +56,7 @@ public:
void codeCompleted(const CodeCompletedMessage &message) override; void codeCompleted(const CodeCompletedMessage &message) override;
void translationUnitDoesNotExist(const TranslationUnitDoesNotExistMessage &message) override; void translationUnitDoesNotExist(const TranslationUnitDoesNotExistMessage &message) override;
void projectPartsDoNotExist(const ProjectPartsDoNotExistMessage &message) override; void projectPartsDoNotExist(const ProjectPartsDoNotExistMessage &message) override;
void diagnosticsChanged(const DiagnosticsChangedMessage &message) override; void documentAnnotationsChanged(const DocumentAnnotationsChangedMessage &message) override;
void highlightingChanged(const HighlightingChangedMessage &message) override;
void readMessages(); void readMessages();
......
...@@ -32,8 +32,7 @@ ...@@ -32,8 +32,7 @@
#include "cmbunregistertranslationunitsforeditormessage.h" #include "cmbunregistertranslationunitsforeditormessage.h"
#include "messageenvelop.h" #include "messageenvelop.h"
#include "registerunsavedfilesforeditormessage.h" #include "registerunsavedfilesforeditormessage.h"
#include "requestdiagnosticsmessage.h" #include "requestdocumentannotations.h"
#include "requesthighlightingmessage.h"
#include "unregisterunsavedfilesforeditormessage.h" #include "unregisterunsavedfilesforeditormessage.h"
#include "updatetranslationunitsforeditormessage.h" #include "updatetranslationunitsforeditormessage.h"
#include "updatevisibletranslationunitsmessage.h" #include "updatevisibletranslationunitsmessage.h"
...@@ -73,11 +72,8 @@ void ClangCodeModelServerInterface::dispatch(const MessageEnvelop &messageEnvelo ...@@ -73,11 +72,8 @@ void ClangCodeModelServerInterface::dispatch(const MessageEnvelop &messageEnvelo
case MessageType::CompleteCodeMessage: case MessageType::CompleteCodeMessage:
completeCode(messageEnvelop.message<CompleteCodeMessage>()); completeCode(messageEnvelop.message<CompleteCodeMessage>());
break; break;
case MessageType::RequestDiagnosticsMessage: case MessageType::RequestDocumentAnnotationsMessage:
requestDiagnostics(messageEnvelop.message<RequestDiagnosticsMessage>()); requestDocumentAnnotations(messageEnvelop.message<RequestDocumentAnnotationsMessage>());
break;
case MessageType::RequestHighlightingMessage:
requestHighlighting(messageEnvelop.message<RequestHighlightingMessage>());
break; break;
case MessageType::UpdateVisibleTranslationUnitsMessage: case MessageType::UpdateVisibleTranslationUnitsMessage:
updateVisibleTranslationUnits(messageEnvelop.message<UpdateVisibleTranslationUnitsMessage>()); updateVisibleTranslationUnits(messageEnvelop.message<UpdateVisibleTranslationUnitsMessage>());
......
...@@ -47,8 +47,7 @@ public: ...@@ -47,8 +47,7 @@ public:
virtual void registerUnsavedFilesForEditor(const RegisterUnsavedFilesForEditorMessage &message) = 0; virtual void registerUnsavedFilesForEditor(const RegisterUnsavedFilesForEditorMessage &message) = 0;
virtual void unregisterUnsavedFilesForEditor(const UnregisterUnsavedFilesForEditorMessage &message) = 0; virtual void unregisterUnsavedFilesForEditor(const UnregisterUnsavedFilesForEditorMessage &message) = 0;
virtual void completeCode(const CompleteCodeMessage &message) = 0; virtual void completeCode(const CompleteCodeMessage &message) = 0;
virtual void requestDiagnostics(const RequestDiagnosticsMessage &message) = 0; virtual void requestDocumentAnnotations(const RequestDocumentAnnotationsMessage &message) = 0;
virtual void requestHighlighting(const RequestHighlightingMessage &message) = 0;
virtual void updateVisibleTranslationUnits(const UpdateVisibleTranslationUnitsMessage &message) = 0; virtual void updateVisibleTranslationUnits(const UpdateVisibleTranslationUnitsMessage &message) = 0;
}; };
......
...@@ -35,8 +35,7 @@ ...@@ -35,8 +35,7 @@
#include <clangcodemodelclientinterface.h> #include <clangcodemodelclientinterface.h>
#include <messageenvelop.h> #include <messageenvelop.h>
#include <registerunsavedfilesforeditormessage.h> #include <registerunsavedfilesforeditormessage.h>
#include <requestdiagnosticsmessage.h> #include <requestdocumentannotations.h>
#include <requesthighlightingmessage.h>
#include <unregisterunsavedfilesforeditormessage.h> #include <unregisterunsavedfilesforeditormessage.h>
#include <updatetranslationunitsforeditormessage.h> #include <updatetranslationunitsforeditormessage.h>
#include <updatevisibletranslationunitsmessage.h> #include <updatevisibletranslationunitsmessage.h>
...@@ -112,12 +111,7 @@ void ClangCodeModelServerProxy::completeCode(const CompleteCodeMessage &message) ...@@ -112,12 +111,7 @@ void ClangCodeModelServerProxy::completeCode(const CompleteCodeMessage &message)
writeMessageBlock.write(message); writeMessageBlock.write(message);
} }
void ClangCodeModelServerProxy::requestDiagnostics(const ClangBackEnd::RequestDiagnosticsMessage &message) void ClangCodeModelServerProxy::requestDocumentAnnotations(const RequestDocumentAnnotationsMessage &message)
{
writeMessageBlock.write(message);
}
void ClangCodeModelServerProxy::requestHighlighting(const RequestHighlightingMessage &message)
{ {
writeMessageBlock.write(message); writeMessageBlock.write(message);
} }
......
...@@ -58,8 +58,7 @@ public: ...@@ -58,8 +58,7 @@ public:
void registerUnsavedFilesForEditor(const RegisterUnsavedFilesForEditorMessage &message) override; void registerUnsavedFilesForEditor(const RegisterUnsavedFilesForEditorMessage &message) override;
void unregisterUnsavedFilesForEditor(const UnregisterUnsavedFilesForEditorMessage &message) override; void unregisterUnsavedFilesForEditor(const UnregisterUnsavedFilesForEditorMessage &message) override;
void completeCode(const CompleteCodeMessage &message) override; void completeCode(const CompleteCodeMessage &message) override;
void requestDiagnostics(const RequestDiagnosticsMessage &message) override; void requestDocumentAnnotations(const RequestDocumentAnnotationsMessage &message) override;
void requestHighlighting(const RequestHighlightingMessage &message) override;
void updateVisibleTranslationUnits(const UpdateVisibleTranslationUnitsMessage &message) override; void updateVisibleTranslationUnits(const UpdateVisibleTranslationUnitsMessage &message) override;
void readMessages(); void readMessages();
......
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#include "diagnosticschangedmessage.h"
#include <QDataStream>
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
DiagnosticsChangedMessage::DiagnosticsChangedMessage(const FileContainer &file,
const QVector<DiagnosticContainer> &diagnostics)
: file_(file),
diagnostics_(diagnostics)
{
}
const FileContainer &DiagnosticsChangedMessage::file() const
{
return file_;
}
const QVector<DiagnosticContainer> &DiagnosticsChangedMessage::diagnostics() const
{
return diagnostics_;
}
QDataStream &operator<<(QDataStream &out, const DiagnosticsChangedMessage &message)
{
out << message.file_;
out << message.diagnostics_;
return out;
}
QDataStream &operator>>(QDataStream &in, DiagnosticsChangedMessage &message)
{
in >> message.file_;
in >> message.diagnostics_;
return in;
}
bool operator==(const DiagnosticsChangedMessage &first, const DiagnosticsChangedMessage &second)
{
return first.file_ == second.file_
&& first.diagnostics_ == second.diagnostics_;
}
QDebug operator<<(QDebug debug, const DiagnosticsChangedMessage &message)
{
debug.nospace() << "DiagnosticsChangedMessage("
<< message.file_
<< ")";
return debug;
}
void PrintTo(const DiagnosticsChangedMessage &message, ::std::ostream* os)
{
*os << "DiagnosticsChangedMessage(";
PrintTo(message.file(), os);
*os << ")";
}
} // namespace ClangBackEnd
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#include "clangbackendipc_global.h"
#include "diagnosticcontainer.h"
#include "filecontainer.h"
#include <QVector>
namespace ClangBackEnd {
class CMBIPC_EXPORT DiagnosticsChangedMessage
{
friend CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const DiagnosticsChangedMessage &message);
friend CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, DiagnosticsChangedMessage &message);
friend CMBIPC_EXPORT bool operator==(const DiagnosticsChangedMessage &first, const DiagnosticsChangedMessage &second);
friend CMBIPC_EXPORT QDebug operator<<(QDebug debug, const DiagnosticsChangedMessage &message);
friend void PrintTo(const DiagnosticsChangedMessage &message, ::std::ostream* os);
public:
DiagnosticsChangedMessage() = default;
DiagnosticsChangedMessage(const FileContainer &file,
const QVector<DiagnosticContainer> &diagnostics);
const FileContainer &file() const;
const QVector<DiagnosticContainer> &diagnostics() const;
private:
FileContainer file_;
QVector<DiagnosticContainer> diagnostics_;
};
CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const DiagnosticsChangedMessage &message);
CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, DiagnosticsChangedMessage &message);
CMBIPC_EXPORT bool operator==(const DiagnosticsChangedMessage &first, const DiagnosticsChangedMessage &second);
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const DiagnosticsChangedMessage &message);
void PrintTo(const DiagnosticsChangedMessage &message, ::std::ostream* os);
DECLARE_MESSAGE(DiagnosticsChangedMessage)
} // namespace ClangBackEnd
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
** **
****************************************************************************/ ****************************************************************************/
#include "highlightingchangedmessage.h" #include "documentannotationschangedmessage.h"
#include <QDataStream> #include <QDataStream>
#include <QDebug> #include <QDebug>
...@@ -32,59 +32,72 @@ ...@@ -32,59 +32,72 @@
namespace ClangBackEnd { namespace ClangBackEnd {
HighlightingChangedMessage::HighlightingChangedMessage(const FileContainer &file, DocumentAnnotationsChangedMessage::DocumentAnnotationsChangedMessage(
const FileContainer &file,
const QVector<DiagnosticContainer> &diagnostics,
const QVector<HighlightingMarkContainer> &highlightingMarks, const QVector<HighlightingMarkContainer> &highlightingMarks,
const QVector<SourceRangeContainer> &skippedPreprocessorRanges) const QVector<SourceRangeContainer> &skippedPreprocessorRanges)
: file_(file), : fileContainer_(file),
diagnostics_(diagnostics),
highlightingMarks_(highlightingMarks), highlightingMarks_(highlightingMarks),
skippedPreprocessorRanges_(skippedPreprocessorRanges) skippedPreprocessorRanges_(skippedPreprocessorRanges)
{ {
} }
const FileContainer &HighlightingChangedMessage::file() const const FileContainer &DocumentAnnotationsChangedMessage::fileContainer() const
{ {
return file_; return fileContainer_;
} }
const QVector<HighlightingMarkContainer> &HighlightingChangedMessage::highlightingMarks() const const QVector<DiagnosticContainer> &DocumentAnnotationsChangedMessage::diagnostics() const
{
return diagnostics_;
}
const QVector<HighlightingMarkContainer> &DocumentAnnotationsChangedMessage::highlightingMarks() const
{ {
return highlightingMarks_; return highlightingMarks_;
} }
const QVector<SourceRangeContainer> &HighlightingChangedMessage::skippedPreprocessorRanges() const const QVector<SourceRangeContainer> &DocumentAnnotationsChangedMessage::skippedPreprocessorRanges() const
{ {
return skippedPreprocessorRanges_; return skippedPreprocessorRanges_;
} }
QDataStream &operator<<(QDataStream &out, const HighlightingChangedMessage &message) QDataStream &operator<<(QDataStream &out, const DocumentAnnotationsChangedMessage &message)
{ {
out << message.file_; out << message.fileContainer_;
out << message.diagnostics_;
out << message.highlightingMarks_; out << message.highlightingMarks_;
out << message.skippedPreprocessorRanges_; out << message.skippedPreprocessorRanges_;
return out; return out;
} }
QDataStream &operator>>(QDataStream &in, HighlightingChangedMessage &message) QDataStream &operator>>(QDataStream &in, DocumentAnnotationsChangedMessage &message)
{ {
in >> message.file_; in >> message.fileContainer_;
in >> message.diagnostics_;
in >> message.highlightingMarks_; in >> message.highlightingMarks_;
in >> message.skippedPreprocessorRanges_; in >> message.skippedPreprocessorRanges_;