Commit 6e14eb69 authored by Marco Bubke's avatar Marco Bubke

Clang: Rename ForCodeCompletion in ForEditor

It reflects that the translation units and projects have a tied
relationship with an editor.

Change-Id: I3c01d5776980fe079af1fdef82feded83fdf5463
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
parent 8ad76164
......@@ -24,14 +24,14 @@ SOURCES += $$PWD/ipcserverinterface.cpp \
$$PWD/connectionclient.cpp \
$$PWD/cmbechomessage.cpp \
$$PWD/ipcclientdispatcher.cpp \
$$PWD/cmbregistertranslationunitsforcodecompletionmessage.cpp \
$$PWD/cmbregistertranslationunitsforeditormessage.cpp \
$$PWD/filecontainer.cpp \
$$PWD/cmbunregistertranslationunitsforcodecompletionmessage.cpp \
$$PWD/cmbunregistertranslationunitsforeditormessage.cpp \
$$PWD/cmbcompletecodemessage.cpp \
$$PWD/cmbcodecompletedmessage.cpp \
$$PWD/codecompletion.cpp \
$$PWD/cmbregisterprojectsforcodecompletionmessage.cpp \
$$PWD/cmbunregisterprojectsforcodecompletionmessage.cpp \
$$PWD/cmbregisterprojectsforeditormessage.cpp \
$$PWD/cmbunregisterprojectsforeditormessage.cpp \
$$PWD/translationunitdoesnotexistmessage.cpp \
$$PWD/codecompletionchunk.cpp \
$$PWD/projectpartcontainer.cpp \
......@@ -60,14 +60,14 @@ HEADERS += \
$$PWD/connectionclient.h \
$$PWD/cmbechomessage.h \
$$PWD/ipcclientdispatcher.h \
$$PWD/cmbregistertranslationunitsforcodecompletionmessage.h \
$$PWD/cmbregistertranslationunitsforeditormessage.h \
$$PWD/filecontainer.h \
$$PWD/cmbunregistertranslationunitsforcodecompletionmessage.h \
$$PWD/cmbunregistertranslationunitsforeditormessage.h \
$$PWD/cmbcompletecodemessage.h \
$$PWD/cmbcodecompletedmessage.h \
$$PWD/codecompletion.h \
$$PWD/cmbregisterprojectsforcodecompletionmessage.h \
$$PWD/cmbunregisterprojectsforcodecompletionmessage.h \
$$PWD/cmbregisterprojectsforeditormessage.h \
$$PWD/cmbunregisterprojectsforeditormessage.h \
$$PWD/translationunitdoesnotexistmessage.h \
$$PWD/codecompletionchunk.h \
$$PWD/projectpartcontainer.h \
......
......@@ -33,10 +33,10 @@
#include "cmbalivemessage.h"
#include "cmbendmessage.h"
#include "cmbechomessage.h"
#include "cmbregistertranslationunitsforcodecompletionmessage.h"
#include "cmbunregistertranslationunitsforcodecompletionmessage.h"
#include "cmbregisterprojectsforcodecompletionmessage.h"
#include "cmbunregisterprojectsforcodecompletionmessage.h"
#include "cmbregistertranslationunitsforeditormessage.h"
#include "cmbunregistertranslationunitsforeditormessage.h"
#include "cmbregisterprojectsforeditormessage.h"
#include "cmbunregisterprojectsforeditormessage.h"
#include "cmbcompletecodemessage.h"
#include "cmbcodecompletedmessage.h"
#include "diagnosticcontainer.h"
......@@ -64,17 +64,17 @@ void Messages::registerMessages()
qRegisterMetaType<EchoMessage>();
qRegisterMetaTypeStreamOperators<EchoMessage>();
qRegisterMetaType<RegisterTranslationUnitForCodeCompletionMessage>();
qRegisterMetaTypeStreamOperators<RegisterTranslationUnitForCodeCompletionMessage>();
QMetaType::registerComparators<RegisterTranslationUnitForCodeCompletionMessage>();
qRegisterMetaType<RegisterTranslationUnitForEditorMessage>();
qRegisterMetaTypeStreamOperators<RegisterTranslationUnitForEditorMessage>();
QMetaType::registerComparators<RegisterTranslationUnitForEditorMessage>();
qRegisterMetaType<FileContainer>();
qRegisterMetaTypeStreamOperators<FileContainer>();
QMetaType::registerComparators<FileContainer>();
qRegisterMetaType<UnregisterTranslationUnitsForCodeCompletionMessage>();
qRegisterMetaTypeStreamOperators<UnregisterTranslationUnitsForCodeCompletionMessage>();
QMetaType::registerComparators<UnregisterTranslationUnitsForCodeCompletionMessage>();
qRegisterMetaType<UnregisterTranslationUnitsForEditorMessage>();
qRegisterMetaTypeStreamOperators<UnregisterTranslationUnitsForEditorMessage>();
QMetaType::registerComparators<UnregisterTranslationUnitsForEditorMessage>();
qRegisterMetaType<CompleteCodeMessage>();
qRegisterMetaTypeStreamOperators<CompleteCodeMessage>();
......@@ -88,17 +88,17 @@ void Messages::registerMessages()
qRegisterMetaTypeStreamOperators<CodeCompletedMessage>();
QMetaType::registerComparators<CodeCompletedMessage>();
qRegisterMetaType<RegisterProjectPartsForCodeCompletionMessage>();
qRegisterMetaTypeStreamOperators<RegisterProjectPartsForCodeCompletionMessage>();
QMetaType::registerComparators<RegisterProjectPartsForCodeCompletionMessage>();
qRegisterMetaType<RegisterProjectPartsForEditorMessage>();
qRegisterMetaTypeStreamOperators<RegisterProjectPartsForEditorMessage>();
QMetaType::registerComparators<RegisterProjectPartsForEditorMessage>();
qRegisterMetaType<ProjectPartContainer>();
qRegisterMetaTypeStreamOperators<ProjectPartContainer>();
QMetaType::registerComparators<ProjectPartContainer>();
qRegisterMetaType<UnregisterProjectPartsForCodeCompletionMessage>();
qRegisterMetaTypeStreamOperators<UnregisterProjectPartsForCodeCompletionMessage>();
QMetaType::registerComparators<UnregisterProjectPartsForCodeCompletionMessage>();
qRegisterMetaType<UnregisterProjectPartsForEditorMessage>();
qRegisterMetaTypeStreamOperators<UnregisterProjectPartsForEditorMessage>();
QMetaType::registerComparators<UnregisterProjectPartsForEditorMessage>();
qRegisterMetaType<TranslationUnitDoesNotExistMessage>();
qRegisterMetaTypeStreamOperators<TranslationUnitDoesNotExistMessage>();
......
......@@ -28,7 +28,7 @@
**
****************************************************************************/
#include "cmbregisterprojectsforcodecompletionmessage.h"
#include "cmbregisterprojectsforeditormessage.h"
#include "container_common.h"
......@@ -40,43 +40,43 @@
namespace ClangBackEnd {
RegisterProjectPartsForCodeCompletionMessage::RegisterProjectPartsForCodeCompletionMessage(const QVector<ProjectPartContainer> &projectContainers)
RegisterProjectPartsForEditorMessage::RegisterProjectPartsForEditorMessage(const QVector<ProjectPartContainer> &projectContainers)
:projectContainers_(projectContainers)
{
}
const QVector<ProjectPartContainer> &RegisterProjectPartsForCodeCompletionMessage::projectContainers() const
const QVector<ProjectPartContainer> &RegisterProjectPartsForEditorMessage::projectContainers() const
{
return projectContainers_;
}
QDataStream &operator<<(QDataStream &out, const RegisterProjectPartsForCodeCompletionMessage &message)
QDataStream &operator<<(QDataStream &out, const RegisterProjectPartsForEditorMessage &message)
{
out << message.projectContainers_;
return out;
}
QDataStream &operator>>(QDataStream &in, RegisterProjectPartsForCodeCompletionMessage &message)
QDataStream &operator>>(QDataStream &in, RegisterProjectPartsForEditorMessage &message)
{
in >> message.projectContainers_;
return in;
}
bool operator==(const RegisterProjectPartsForCodeCompletionMessage &first, const RegisterProjectPartsForCodeCompletionMessage &second)
bool operator==(const RegisterProjectPartsForEditorMessage &first, const RegisterProjectPartsForEditorMessage &second)
{
return first.projectContainers_ == second.projectContainers_;
}
bool operator<(const RegisterProjectPartsForCodeCompletionMessage &first, const RegisterProjectPartsForCodeCompletionMessage &second)
bool operator<(const RegisterProjectPartsForEditorMessage &first, const RegisterProjectPartsForEditorMessage &second)
{
return compareContainer(first.projectContainers_, second.projectContainers_);
}
QDebug operator<<(QDebug debug, const RegisterProjectPartsForCodeCompletionMessage &message)
QDebug operator<<(QDebug debug, const RegisterProjectPartsForEditorMessage &message)
{
debug.nospace() << "RegisterProjectPartsForCodeCompletionMessage(";
debug.nospace() << "RegisterProjectPartsForEditorMessage(";
for (const ProjectPartContainer &projectContainer : message.projectContainers())
debug.nospace() << projectContainer<< ", ";
......@@ -86,9 +86,9 @@ QDebug operator<<(QDebug debug, const RegisterProjectPartsForCodeCompletionMessa
return debug;
}
void PrintTo(const RegisterProjectPartsForCodeCompletionMessage &message, ::std::ostream* os)
void PrintTo(const RegisterProjectPartsForEditorMessage &message, ::std::ostream* os)
{
*os << "RegisterProjectPartsForCodeCompletionMessage(";
*os << "RegisterProjectPartsForEditorMessage(";
for (const ProjectPartContainer &projectContainer : message.projectContainers())
PrintTo(projectContainer, os);
......
......@@ -28,8 +28,8 @@
**
****************************************************************************/
#ifndef CLANGBACKEND_REGISTERPROJECTSFORCODECOMPLETIONMESSAGE_H
#define CLANGBACKEND_REGISTERPROJECTSFORCODECOMPLETIONMESSAGE_H
#ifndef CLANGBACKEND_REGISTERPROJECTSFOREDITORMESSAGE_H
#define CLANGBACKEND_REGISTERPROJECTSFOREDITORMESSAGE_H
#include "projectpartcontainer.h"
......@@ -38,16 +38,16 @@
namespace ClangBackEnd {
class CMBIPC_EXPORT RegisterProjectPartsForCodeCompletionMessage
class CMBIPC_EXPORT RegisterProjectPartsForEditorMessage
{
friend CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const RegisterProjectPartsForCodeCompletionMessage &message);
friend CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, RegisterProjectPartsForCodeCompletionMessage &message);
friend CMBIPC_EXPORT bool operator==(const RegisterProjectPartsForCodeCompletionMessage &first, const RegisterProjectPartsForCodeCompletionMessage &second);
friend CMBIPC_EXPORT bool operator<(const RegisterProjectPartsForCodeCompletionMessage &first, const RegisterProjectPartsForCodeCompletionMessage &second);
friend void PrintTo(const RegisterProjectPartsForCodeCompletionMessage &message, ::std::ostream* os);
friend CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const RegisterProjectPartsForEditorMessage &message);
friend CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, RegisterProjectPartsForEditorMessage &message);
friend CMBIPC_EXPORT bool operator==(const RegisterProjectPartsForEditorMessage &first, const RegisterProjectPartsForEditorMessage &second);
friend CMBIPC_EXPORT bool operator<(const RegisterProjectPartsForEditorMessage &first, const RegisterProjectPartsForEditorMessage &second);
friend void PrintTo(const RegisterProjectPartsForEditorMessage &message, ::std::ostream* os);
public:
RegisterProjectPartsForCodeCompletionMessage() = default;
RegisterProjectPartsForCodeCompletionMessage(const QVector<ProjectPartContainer> &projectContainers);
RegisterProjectPartsForEditorMessage() = default;
RegisterProjectPartsForEditorMessage(const QVector<ProjectPartContainer> &projectContainers);
const QVector<ProjectPartContainer> &projectContainers() const;
......@@ -55,15 +55,15 @@ private:
QVector<ProjectPartContainer> projectContainers_;
};
CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const RegisterProjectPartsForCodeCompletionMessage &message);
CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, RegisterProjectPartsForCodeCompletionMessage &message);
CMBIPC_EXPORT bool operator==(const RegisterProjectPartsForCodeCompletionMessage &first, const RegisterProjectPartsForCodeCompletionMessage &second);
CMBIPC_EXPORT bool operator<(const RegisterProjectPartsForCodeCompletionMessage &first, const RegisterProjectPartsForCodeCompletionMessage &second);
CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const RegisterProjectPartsForEditorMessage &message);
CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, RegisterProjectPartsForEditorMessage &message);
CMBIPC_EXPORT bool operator==(const RegisterProjectPartsForEditorMessage &first, const RegisterProjectPartsForEditorMessage &second);
CMBIPC_EXPORT bool operator<(const RegisterProjectPartsForEditorMessage &first, const RegisterProjectPartsForEditorMessage &second);
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const RegisterProjectPartsForCodeCompletionMessage &message);
void PrintTo(const RegisterProjectPartsForCodeCompletionMessage &message, ::std::ostream* os);
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const RegisterProjectPartsForEditorMessage &message);
void PrintTo(const RegisterProjectPartsForEditorMessage &message, ::std::ostream* os);
} // namespace ClangBackEnd
Q_DECLARE_METATYPE(ClangBackEnd::RegisterProjectPartsForCodeCompletionMessage)
Q_DECLARE_METATYPE(ClangBackEnd::RegisterProjectPartsForEditorMessage)
#endif // CLANGBACKEND_REGISTERPROJECTSFORCODECOMPLETIONMESSAGE_H
#endif // CLANGBACKEND_REGISTERPROJECTSFOREDITORMESSAGE_H
......@@ -28,7 +28,7 @@
**
****************************************************************************/
#include "cmbregistertranslationunitsforcodecompletionmessage.h"
#include "cmbregistertranslationunitsforeditormessage.h"
#include "container_common.h"
......@@ -39,43 +39,43 @@
namespace ClangBackEnd {
RegisterTranslationUnitForCodeCompletionMessage::RegisterTranslationUnitForCodeCompletionMessage(const QVector<FileContainer> &fileContainers)
RegisterTranslationUnitForEditorMessage::RegisterTranslationUnitForEditorMessage(const QVector<FileContainer> &fileContainers)
: fileContainers_(fileContainers)
{
}
const QVector<FileContainer> &RegisterTranslationUnitForCodeCompletionMessage::fileContainers() const
const QVector<FileContainer> &RegisterTranslationUnitForEditorMessage::fileContainers() const
{
return fileContainers_;
}
QDataStream &operator<<(QDataStream &out, const RegisterTranslationUnitForCodeCompletionMessage &message)
QDataStream &operator<<(QDataStream &out, const RegisterTranslationUnitForEditorMessage &message)
{
out << message.fileContainers_;
return out;
}
QDataStream &operator>>(QDataStream &in, RegisterTranslationUnitForCodeCompletionMessage &message)
QDataStream &operator>>(QDataStream &in, RegisterTranslationUnitForEditorMessage &message)
{
in >> message.fileContainers_;
return in;
}
bool operator==(const RegisterTranslationUnitForCodeCompletionMessage &first, const RegisterTranslationUnitForCodeCompletionMessage &second)
bool operator==(const RegisterTranslationUnitForEditorMessage &first, const RegisterTranslationUnitForEditorMessage &second)
{
return first.fileContainers_ == second.fileContainers_;
}
bool operator<(const RegisterTranslationUnitForCodeCompletionMessage &first, const RegisterTranslationUnitForCodeCompletionMessage &second)
bool operator<(const RegisterTranslationUnitForEditorMessage &first, const RegisterTranslationUnitForEditorMessage &second)
{
return compareContainer(first.fileContainers_, second.fileContainers_);
}
QDebug operator<<(QDebug debug, const RegisterTranslationUnitForCodeCompletionMessage &message)
QDebug operator<<(QDebug debug, const RegisterTranslationUnitForEditorMessage &message)
{
debug.nospace() << "RegisterTranslationUnitForCodeCompletionMessage(";
debug.nospace() << "RegisterTranslationUnitForEditorMessage(";
for (const FileContainer &fileContainer : message.fileContainers())
debug.nospace() << fileContainer<< ", ";
......@@ -85,9 +85,9 @@ QDebug operator<<(QDebug debug, const RegisterTranslationUnitForCodeCompletionMe
return debug;
}
void PrintTo(const RegisterTranslationUnitForCodeCompletionMessage &message, ::std::ostream* os)
void PrintTo(const RegisterTranslationUnitForEditorMessage &message, ::std::ostream* os)
{
*os << "RegisterTranslationUnitForCodeCompletionMessage(";
*os << "RegisterTranslationUnitForEditorMessage(";
for (const FileContainer &fileContainer : message.fileContainers())
PrintTo(fileContainer, os);
......
......@@ -28,8 +28,8 @@
**
****************************************************************************/
#ifndef CLANGBACKEND_REGISTERFILEFORCODECOMPLETION_H
#define CLANGBACKEND_REGISTERFILEFORCODECOMPLETION_H
#ifndef CLANGBACKEND_REGISTERFILEFOREDITOR_H
#define CLANGBACKEND_REGISTERFILEFOREDITOR_H
#include "filecontainer.h"
......@@ -38,16 +38,16 @@
namespace ClangBackEnd {
class CMBIPC_EXPORT RegisterTranslationUnitForCodeCompletionMessage
class CMBIPC_EXPORT RegisterTranslationUnitForEditorMessage
{
friend CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const RegisterTranslationUnitForCodeCompletionMessage &message);
friend CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, RegisterTranslationUnitForCodeCompletionMessage &message);
friend CMBIPC_EXPORT bool operator==(const RegisterTranslationUnitForCodeCompletionMessage &first, const RegisterTranslationUnitForCodeCompletionMessage &second);
friend CMBIPC_EXPORT bool operator<(const RegisterTranslationUnitForCodeCompletionMessage &first, const RegisterTranslationUnitForCodeCompletionMessage &second);
friend void PrintTo(const RegisterTranslationUnitForCodeCompletionMessage &message, ::std::ostream* os);
friend CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const RegisterTranslationUnitForEditorMessage &message);
friend CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, RegisterTranslationUnitForEditorMessage &message);
friend CMBIPC_EXPORT bool operator==(const RegisterTranslationUnitForEditorMessage &first, const RegisterTranslationUnitForEditorMessage &second);
friend CMBIPC_EXPORT bool operator<(const RegisterTranslationUnitForEditorMessage &first, const RegisterTranslationUnitForEditorMessage &second);
friend void PrintTo(const RegisterTranslationUnitForEditorMessage &message, ::std::ostream* os);
public:
RegisterTranslationUnitForCodeCompletionMessage() = default;
RegisterTranslationUnitForCodeCompletionMessage(const QVector<FileContainer> &fileContainers);
RegisterTranslationUnitForEditorMessage() = default;
RegisterTranslationUnitForEditorMessage(const QVector<FileContainer> &fileContainers);
const QVector<FileContainer> &fileContainers() const;
......@@ -55,15 +55,15 @@ private:
QVector<FileContainer> fileContainers_;
};
CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const RegisterTranslationUnitForCodeCompletionMessage &message);
CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, RegisterTranslationUnitForCodeCompletionMessage &message);
CMBIPC_EXPORT bool operator==(const RegisterTranslationUnitForCodeCompletionMessage &first, const RegisterTranslationUnitForCodeCompletionMessage &second);
CMBIPC_EXPORT bool operator<(const RegisterTranslationUnitForCodeCompletionMessage &first, const RegisterTranslationUnitForCodeCompletionMessage &second);
CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const RegisterTranslationUnitForEditorMessage &message);
CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, RegisterTranslationUnitForEditorMessage &message);
CMBIPC_EXPORT bool operator==(const RegisterTranslationUnitForEditorMessage &first, const RegisterTranslationUnitForEditorMessage &second);
CMBIPC_EXPORT bool operator<(const RegisterTranslationUnitForEditorMessage &first, const RegisterTranslationUnitForEditorMessage &second);
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const RegisterTranslationUnitForCodeCompletionMessage &message);
void PrintTo(const RegisterTranslationUnitForCodeCompletionMessage &message, ::std::ostream* os);
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const RegisterTranslationUnitForEditorMessage &message);
void PrintTo(const RegisterTranslationUnitForEditorMessage &message, ::std::ostream* os);
} // namespace ClangBackEnd
Q_DECLARE_METATYPE(ClangBackEnd::RegisterTranslationUnitForCodeCompletionMessage)
Q_DECLARE_METATYPE(ClangBackEnd::RegisterTranslationUnitForEditorMessage)
#endif // CLANGBACKEND_REGISTERFILEFORCODECOMPLITION_H
......@@ -28,7 +28,7 @@
**
****************************************************************************/
#include "cmbunregisterprojectsforcodecompletionmessage.h"
#include "cmbunregisterprojectsforeditormessage.h"
#include "container_common.h"
......@@ -41,43 +41,43 @@
namespace ClangBackEnd {
UnregisterProjectPartsForCodeCompletionMessage::UnregisterProjectPartsForCodeCompletionMessage(const Utf8StringVector &filePaths)
UnregisterProjectPartsForEditorMessage::UnregisterProjectPartsForEditorMessage(const Utf8StringVector &filePaths)
: projectPartIds_(filePaths)
{
}
const Utf8StringVector &UnregisterProjectPartsForCodeCompletionMessage::projectPartIds() const
const Utf8StringVector &UnregisterProjectPartsForEditorMessage::projectPartIds() const
{
return projectPartIds_;
}
QDataStream &operator<<(QDataStream &out, const UnregisterProjectPartsForCodeCompletionMessage &message)
QDataStream &operator<<(QDataStream &out, const UnregisterProjectPartsForEditorMessage &message)
{
out << message.projectPartIds_;
return out;
}
QDataStream &operator>>(QDataStream &in, UnregisterProjectPartsForCodeCompletionMessage &message)
QDataStream &operator>>(QDataStream &in, UnregisterProjectPartsForEditorMessage &message)
{
in >> message.projectPartIds_;
return in;
}
bool operator==(const UnregisterProjectPartsForCodeCompletionMessage &first, const UnregisterProjectPartsForCodeCompletionMessage &second)
bool operator==(const UnregisterProjectPartsForEditorMessage &first, const UnregisterProjectPartsForEditorMessage &second)
{
return first.projectPartIds_ == second.projectPartIds_;
}
bool operator<(const UnregisterProjectPartsForCodeCompletionMessage &first, const UnregisterProjectPartsForCodeCompletionMessage &second)
bool operator<(const UnregisterProjectPartsForEditorMessage &first, const UnregisterProjectPartsForEditorMessage &second)
{
return compareContainer(first.projectPartIds_, second.projectPartIds_);
}
QDebug operator<<(QDebug debug, const UnregisterProjectPartsForCodeCompletionMessage &message)
QDebug operator<<(QDebug debug, const UnregisterProjectPartsForEditorMessage &message)
{
debug.nospace() << "UnregisterProjectPartsForCodeCompletionMessage(";
debug.nospace() << "UnregisterProjectPartsForEditorMessage(";
for (const Utf8String &fileNames_ : message.projectPartIds())
debug.nospace() << fileNames_ << ", ";
......@@ -87,9 +87,9 @@ QDebug operator<<(QDebug debug, const UnregisterProjectPartsForCodeCompletionMes
return debug;
}
void PrintTo(const UnregisterProjectPartsForCodeCompletionMessage &message, ::std::ostream* os)
void PrintTo(const UnregisterProjectPartsForEditorMessage &message, ::std::ostream* os)
{
*os << "UnregisterProjectPartsForCodeCompletionMessage(";
*os << "UnregisterProjectPartsForEditorMessage(";
for (const Utf8String &fileNames_ : message.projectPartIds())
*os << fileNames_.constData() << ", ";
......
......@@ -28,8 +28,8 @@
**
****************************************************************************/
#ifndef CLANGBACKEND_UNREGISTERPROJECTSFORCODECOMPLETION_H
#define CLANGBACKEND_UNREGISTERPROJECTSFORCODECOMPLETION_H
#ifndef CLANGBACKEND_UNREGISTERPROJECTSFOREDITOR_H
#define CLANGBACKEND_UNREGISTERPROJECTSFOREDITOR_H
#include "clangbackendipc_global.h"
......@@ -39,17 +39,17 @@
namespace ClangBackEnd {
class CMBIPC_EXPORT UnregisterProjectPartsForCodeCompletionMessage
class CMBIPC_EXPORT UnregisterProjectPartsForEditorMessage
{
friend CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const UnregisterProjectPartsForCodeCompletionMessage &message);
friend CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, UnregisterProjectPartsForCodeCompletionMessage &message);
friend CMBIPC_EXPORT bool operator==(const UnregisterProjectPartsForCodeCompletionMessage &first, const UnregisterProjectPartsForCodeCompletionMessage &second);
friend CMBIPC_EXPORT bool operator<(const UnregisterProjectPartsForCodeCompletionMessage &first, const UnregisterProjectPartsForCodeCompletionMessage &second);
friend void PrintTo(const UnregisterProjectPartsForCodeCompletionMessage &message, ::std::ostream* os);
friend CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const UnregisterProjectPartsForEditorMessage &message);
friend CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, UnregisterProjectPartsForEditorMessage &message);
friend CMBIPC_EXPORT bool operator==(const UnregisterProjectPartsForEditorMessage &first, const UnregisterProjectPartsForEditorMessage &second);
friend CMBIPC_EXPORT bool operator<(const UnregisterProjectPartsForEditorMessage &first, const UnregisterProjectPartsForEditorMessage &second);
friend void PrintTo(const UnregisterProjectPartsForEditorMessage &message, ::std::ostream* os);
public:
UnregisterProjectPartsForCodeCompletionMessage() = default;
UnregisterProjectPartsForCodeCompletionMessage(const Utf8StringVector &projectPartIds);
UnregisterProjectPartsForEditorMessage() = default;
UnregisterProjectPartsForEditorMessage(const Utf8StringVector &projectPartIds);
const Utf8StringVector &projectPartIds() const;
......@@ -57,15 +57,15 @@ private:
Utf8StringVector projectPartIds_;
};
CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const UnregisterProjectPartsForCodeCompletionMessage &message);
CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, UnregisterProjectPartsForCodeCompletionMessage &message);
CMBIPC_EXPORT bool operator==(const UnregisterProjectPartsForCodeCompletionMessage &first, const UnregisterProjectPartsForCodeCompletionMessage &second);
CMBIPC_EXPORT bool operator<(const UnregisterProjectPartsForCodeCompletionMessage &first, const UnregisterProjectPartsForCodeCompletionMessage &second);
CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const UnregisterProjectPartsForEditorMessage &message);
CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, UnregisterProjectPartsForEditorMessage &message);
CMBIPC_EXPORT bool operator==(const UnregisterProjectPartsForEditorMessage &first, const UnregisterProjectPartsForEditorMessage &second);
CMBIPC_EXPORT bool operator<(const UnregisterProjectPartsForEditorMessage &first, const UnregisterProjectPartsForEditorMessage &second);
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const UnregisterProjectPartsForCodeCompletionMessage &message);
void PrintTo(const UnregisterProjectPartsForCodeCompletionMessage &message, ::std::ostream* os);
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const UnregisterProjectPartsForEditorMessage &message);
void PrintTo(const UnregisterProjectPartsForEditorMessage &message, ::std::ostream* os);
} // namespace ClangBackEnd
Q_DECLARE_METATYPE(ClangBackEnd::UnregisterProjectPartsForCodeCompletionMessage)
Q_DECLARE_METATYPE(ClangBackEnd::UnregisterProjectPartsForEditorMessage)
#endif // CLANGBACKEND_UNREGISTERPROJECTSFORCODECOMPLETION_H
#endif // CLANGBACKEND_UNREGISTERPROJECTSFOREDITOR_H
......@@ -28,7 +28,7 @@
**
****************************************************************************/
#include "cmbunregistertranslationunitsforcodecompletionmessage.h"
#include "cmbunregistertranslationunitsforeditormessage.h"
#include "container_common.h"
......@@ -42,43 +42,43 @@
namespace ClangBackEnd {
UnregisterTranslationUnitsForCodeCompletionMessage::UnregisterTranslationUnitsForCodeCompletionMessage(const QVector<FileContainer> &fileContainers)
UnregisterTranslationUnitsForEditorMessage::UnregisterTranslationUnitsForEditorMessage(const QVector<FileContainer> &fileContainers)
: fileContainers_(fileContainers)
{
}
const QVector<FileContainer> &UnregisterTranslationUnitsForCodeCompletionMessage::fileContainers() const
const QVector<FileContainer> &UnregisterTranslationUnitsForEditorMessage::fileContainers() const
{
return fileContainers_;
}
QDataStream &operator<<(QDataStream &out, const UnregisterTranslationUnitsForCodeCompletionMessage &message)
QDataStream &operator<<(QDataStream &out, const UnregisterTranslationUnitsForEditorMessage &message)
{
out << message.fileContainers_;
return out;
}
QDataStream &operator>>(QDataStream &in, UnregisterTranslationUnitsForCodeCompletionMessage &message)
QDataStream &operator>>(QDataStream &in, UnregisterTranslationUnitsForEditorMessage &message)
{
in >> message.fileContainers_;
return in;
}
bool operator==(const UnregisterTranslationUnitsForCodeCompletionMessage &first, const UnregisterTranslationUnitsForCodeCompletionMessage &second)
bool operator==(const UnregisterTranslationUnitsForEditorMessage &first, const UnregisterTranslationUnitsForEditorMessage &second)
{
return first.fileContainers_ == second.fileContainers_;
}
bool operator<(const UnregisterTranslationUnitsForCodeCompletionMessage &first, const UnregisterTranslationUnitsForCodeCompletionMessage &second)
bool operator<(const UnregisterTranslationUnitsForEditorMessage &first, const UnregisterTranslationUnitsForEditorMessage &second)
{
return compareContainer(first.fileContainers_, second.fileContainers_);
}
QDebug operator<<(QDebug debug, const UnregisterTranslationUnitsForCodeCompletionMessage &message)
QDebug operator<<(QDebug debug, const UnregisterTranslationUnitsForEditorMessage &message)
{
debug.nospace() << "UnregisterTranslationUnitsForCodeCompletionMessage(";
debug.nospace() << "UnregisterTranslationUnitsForEditorMessage(";
for (const FileContainer &fileContainer : message.fileContainers())
debug.nospace() << fileContainer << ", ";
......@@ -89,9 +89,9 @@ QDebug operator<<(QDebug debug, const UnregisterTranslationUnitsForCodeCompletio
}
#ifdef CLANGBACKEND_TESTS
void PrintTo(const UnregisterTranslationUnitsForCodeCompletionMessage &message, ::std::ostream* os)
void PrintTo(const UnregisterTranslationUnitsForEditorMessage &message, ::std::ostream* os)
{
*os << "UnregisterTranslationUnitsForCodeCompletionMessage(";
*os << "UnregisterTranslationUnitsForEditorMessage(";
for (const FileContainer &fileContainer : message.fileContainers())
*os << ::testing::PrintToString(fileContainer) << ", ";
......
......@@ -28,8 +28,8 @@
**
****************************************************************************/
#ifndef CLANGBACKEND_UNRegisterTranslationUnitForCodeCompletionMessage_H
#define CLANGBACKEND_UNRegisterTranslationUnitForCodeCompletionMessage_H
#ifndef CLANGBACKEND_UNRegisterTranslationUnitForEditorMessage_H
#define CLANGBACKEND_UNRegisterTranslationUnitForEditorMessage_H
#include "clangbackendipc_global.h"
......@@ -40,17 +40,17 @@