forked from qt-creator/qt-creator
Clang: Rename CodeModelBackEnd in ClangBackEnd
Change-Id: I13e8a458634110456375956d4d4da7239c86957f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -117,7 +117,7 @@ tmp/
|
||||
*.dll
|
||||
*.exe
|
||||
/bin/buildoutputparser
|
||||
/bin/codemodelbackend
|
||||
/bin/clangbackend
|
||||
/bin/cpaster
|
||||
/bin/cplusplus-ast2png
|
||||
/bin/cplusplus-frontend
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
contains(CONFIG, dll) {
|
||||
DEFINES += CODEMODELBACKENDIPC_BUILD_LIB
|
||||
DEFINES += CLANGBACKENDIPC_BUILD_LIB
|
||||
} else {
|
||||
DEFINES += CODEMODELBACKENDIPC_BUILD_STATIC_LIB
|
||||
DEFINES += CLANGBACKENDIPC_BUILD_STATIC_LIB
|
||||
}
|
||||
|
||||
QT += network
|
||||
|
||||
DEFINES += CODEMODELBACKENDIPC_LIBRARY
|
||||
DEFINES += CLANGBACKENDIPC_LIBRARY
|
||||
|
||||
INCLUDEPATH += $$PWD
|
||||
|
||||
@@ -31,7 +31,6 @@ SOURCES += $$PWD/ipcserverinterface.cpp \
|
||||
$$PWD/cmbcompletecodecommand.cpp \
|
||||
$$PWD/cmbcodecompletedcommand.cpp \
|
||||
$$PWD/codecompletion.cpp \
|
||||
$$PWD/codemodelbackendipc_global.cpp \
|
||||
$$PWD/cmbregisterprojectsforcodecompletioncommand.cpp \
|
||||
$$PWD/cmbunregisterprojectsforcodecompletioncommand.cpp \
|
||||
$$PWD/translationunitdoesnotexistcommand.cpp \
|
||||
@@ -40,7 +39,7 @@ SOURCES += $$PWD/ipcserverinterface.cpp \
|
||||
$$PWD/projectpartsdonotexistcommand.cpp
|
||||
|
||||
|
||||
HEADERS += $$PWD/codemodelbackendipc_global.h \
|
||||
HEADERS += \
|
||||
$$PWD/ipcserverinterface.h \
|
||||
$$PWD/ipcserverproxy.h \
|
||||
$$PWD/ipcserver.h \
|
||||
@@ -68,6 +67,7 @@ HEADERS += $$PWD/codemodelbackendipc_global.h \
|
||||
$$PWD/codecompletionchunk.h \
|
||||
$$PWD/projectpartcontainer.h \
|
||||
$$PWD/projectpartsdonotexistcommand.h \
|
||||
$$PWD/container_common.h
|
||||
$$PWD/container_common.h \
|
||||
$$PWD/clangbackendipc_global.h
|
||||
|
||||
contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
|
||||
2
src/libs/clangbackendipc/clangbackendipc.pro
Normal file
2
src/libs/clangbackendipc/clangbackendipc.pro
Normal file
@@ -0,0 +1,2 @@
|
||||
include(../../qtcreatorlibrary.pri)
|
||||
include(clangbackendipc-lib.pri)
|
||||
@@ -1,12 +1,12 @@
|
||||
import qbs 1.0
|
||||
|
||||
QtcLibrary {
|
||||
name: "CodeModelBackEndIpc"
|
||||
name: "ClangBackEndIpc"
|
||||
|
||||
Depends { name: "Qt.network" }
|
||||
Depends { name: "Sqlite" }
|
||||
|
||||
cpp.defines: base.concat("CODEMODELBACKENDIPC_LIBRARY")
|
||||
cpp.defines: base.concat("CLANGIPC_LIBRARY")
|
||||
cpp.includePaths: base.concat(".")
|
||||
|
||||
Group {
|
||||
@@ -0,0 +1,3 @@
|
||||
QTC_LIB_NAME = Clangbackendipc
|
||||
QTC_LIB_DEPENDS += sqlite
|
||||
INCLUDEPATH *= $$IDE_SOURCE_TREE/src/libs/clangbackendipc
|
||||
@@ -28,23 +28,23 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKENDIPC_GLOBAL_H
|
||||
#define CODEMODELBACKENDIPC_GLOBAL_H
|
||||
#ifndef CLANGBACKENDIPC_GLOBAL_H
|
||||
#define CLANGBACKENDIPC_GLOBAL_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#if defined(CODEMODELBACKENDIPC_LIBRARY)
|
||||
#if defined(CLANGBACKENDIPC_LIBRARY)
|
||||
# define CMBIPC_EXPORT Q_DECL_EXPORT
|
||||
#else
|
||||
# define CMBIPC_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
||||
#ifndef CODEMODELBACKENDPROCESSPATH
|
||||
# define CODEMODELBACKENDPROCESSPATH ""
|
||||
#ifndef CLANGBACKENDPROCESSPATH
|
||||
# define CLANGBACKENDPROCESSPATH ""
|
||||
#endif
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
CMBIPC_EXPORT void registerTypes();
|
||||
}
|
||||
|
||||
#endif // CODEMODELBACKENDIPC_GLOBAL_H
|
||||
#endif // CLANGBACKENDIPC_GLOBAL_H
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#include <QDataStream>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
QDataStream &operator<<(QDataStream &out, const AliveCommand &/*command*/)
|
||||
{
|
||||
@@ -31,11 +31,11 @@
|
||||
#ifndef CMBALIVECOMMAND_H
|
||||
#define CMBALIVECOMMAND_H
|
||||
|
||||
#include "codemodelbackendipc_global.h"
|
||||
#include "clangbackendipc_global.h"
|
||||
|
||||
#include <QMetaType>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT AliveCommand
|
||||
{
|
||||
@@ -50,6 +50,6 @@ CMBIPC_EXPORT QDebug operator<<(QDebug debug, const AliveCommand &command);
|
||||
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(CodeModelBackEnd::AliveCommand)
|
||||
Q_DECLARE_METATYPE(ClangBackEnd::AliveCommand)
|
||||
|
||||
#endif // CMBALIVECOMMAND_H
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
CodeCompletedCommand::CodeCompletedCommand(const QVector<CodeCompletion> &codeCompletions, quint64 ticketNumber)
|
||||
: codeCompletions_(codeCompletions),
|
||||
@@ -102,5 +102,5 @@ void PrintTo(const CodeCompletedCommand &command, ::std::ostream* os)
|
||||
*os << output.toUtf8().constData();
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,15 +28,15 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_CODECOMPLETEDCOMMAND_H
|
||||
#define CODEMODELBACKEND_CODECOMPLETEDCOMMAND_H
|
||||
#ifndef CLANGBACKEND_CODECOMPLETEDCOMMAND_H
|
||||
#define CLANGBACKEND_CODECOMPLETEDCOMMAND_H
|
||||
|
||||
#include <QMetaType>
|
||||
#include <QVector>
|
||||
|
||||
#include "codecompletion.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT CodeCompletedCommand
|
||||
{
|
||||
@@ -67,8 +67,8 @@ CMBIPC_EXPORT bool operator<(const CodeCompletedCommand &first, const CodeComple
|
||||
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const CodeCompletedCommand &command);
|
||||
void PrintTo(const CodeCompletedCommand &command, ::std::ostream* os);
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Q_DECLARE_METATYPE(CodeModelBackEnd::CodeCompletedCommand)
|
||||
Q_DECLARE_METATYPE(ClangBackEnd::CodeCompletedCommand)
|
||||
|
||||
#endif // CODEMODELBACKEND_CODECOMPLETEDCOMMAND_H
|
||||
#endif // CLANGBACKEND_CODECOMPLETEDCOMMAND_H
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
#include <QDataStream>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
void Commands::registerCommands()
|
||||
{
|
||||
@@ -104,5 +104,5 @@ void Commands::registerCommands()
|
||||
QMetaType::registerComparators<ProjectPartsDoNotExistCommand>();
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,18 +28,18 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_COMMANDS_H
|
||||
#define CODEMODELBACKEND_COMMANDS_H
|
||||
#ifndef CLANGBACKEND_COMMANDS_H
|
||||
#define CLANGBACKEND_COMMANDS_H
|
||||
|
||||
#include <codemodelbackendipc_global.h>
|
||||
#include <clangbackendipc_global.h>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
namespace Commands
|
||||
{
|
||||
CMBIPC_EXPORT void registerCommands();
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
#endif // CODEMODELBACKEND_COMMANDS_H
|
||||
#endif // CLANGBACKEND_COMMANDS_H
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
quint64 CompleteCodeCommand::ticketCounter = 0;
|
||||
|
||||
@@ -142,5 +142,5 @@ void PrintTo(const CompleteCodeCommand &command, ::std::ostream* os)
|
||||
*os << ")";
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,15 +28,15 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_COMPLETECODECOMMAND_H
|
||||
#define CODEMODELBACKEND_COMPLETECODECOMMAND_H
|
||||
#ifndef CLANGBACKEND_COMPLETECODECOMMAND_H
|
||||
#define CLANGBACKEND_COMPLETECODECOMMAND_H
|
||||
|
||||
#include "codemodelbackendipc_global.h"
|
||||
#include "clangbackendipc_global.h"
|
||||
|
||||
#include <QMetaType>
|
||||
#include <utf8string.h>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT CompleteCodeCommand
|
||||
{
|
||||
@@ -79,8 +79,8 @@ CMBIPC_EXPORT bool operator<(const CompleteCodeCommand &first, const CompleteCod
|
||||
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const CompleteCodeCommand &command);
|
||||
void PrintTo(const CompleteCodeCommand &command, ::std::ostream* os);
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Q_DECLARE_METATYPE(CodeModelBackEnd::CompleteCodeCommand)
|
||||
Q_DECLARE_METATYPE(ClangBackEnd::CompleteCodeCommand)
|
||||
|
||||
#endif // CODEMODELBACKEND_COMPLETECODECOMMAND_H
|
||||
#endif // CLANGBACKEND_COMPLETECODECOMMAND_H
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
EchoCommand::EchoCommand(const QVariant &command)
|
||||
: command_(command)
|
||||
@@ -88,5 +88,5 @@ void PrintTo(const EchoCommand &command, ::std::ostream* os)
|
||||
*os << output.toUtf8().constData();
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,15 +28,15 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_ECHOCOMMAND_H
|
||||
#define CODEMODELBACKEND_ECHOCOMMAND_H
|
||||
#ifndef CLANGBACKEND_ECHOCOMMAND_H
|
||||
#define CLANGBACKEND_ECHOCOMMAND_H
|
||||
|
||||
#include "codemodelbackendipc_global.h"
|
||||
#include "clangbackendipc_global.h"
|
||||
|
||||
#include <QMetaType>
|
||||
#include <QVariant>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT EchoCommand
|
||||
{
|
||||
@@ -61,8 +61,8 @@ CMBIPC_EXPORT bool operator<(const EchoCommand &first, const EchoCommand &second
|
||||
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const EchoCommand &command);
|
||||
void PrintTo(const EchoCommand &command, ::std::ostream* os);
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Q_DECLARE_METATYPE(CodeModelBackEnd::EchoCommand)
|
||||
Q_DECLARE_METATYPE(ClangBackEnd::EchoCommand)
|
||||
|
||||
#endif // CODEMODELBACKEND_ECHOCOMMAND_H
|
||||
#endif // CLANGBACKEND_ECHOCOMMAND_H
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
QDataStream &operator<<(QDataStream &out, const EndCommand &/*command*/)
|
||||
{
|
||||
@@ -31,11 +31,11 @@
|
||||
#ifndef CMBENDCOMMAND_H
|
||||
#define CMBENDCOMMAND_H
|
||||
|
||||
#include "codemodelbackendipc_global.h"
|
||||
#include "clangbackendipc_global.h"
|
||||
|
||||
#include <QMetaType>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT EndCommand
|
||||
{
|
||||
@@ -50,6 +50,6 @@ CMBIPC_EXPORT QDebug operator<<(QDebug debug, const EndCommand &command);
|
||||
void PrintTo(const EndCommand &command, ::std::ostream* os);
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(CodeModelBackEnd::EndCommand)
|
||||
Q_DECLARE_METATYPE(ClangBackEnd::EndCommand)
|
||||
|
||||
#endif // CMBENDCOMMAND_H
|
||||
@@ -38,9 +38,9 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <container_common.h>
|
||||
#include "container_common.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
RegisterProjectPartsForCodeCompletionCommand::RegisterProjectPartsForCodeCompletionCommand(const QVector<ProjectPartContainer> &projectContainers)
|
||||
:projectContainers_(projectContainers)
|
||||
@@ -98,5 +98,5 @@ void PrintTo(const RegisterProjectPartsForCodeCompletionCommand &command, ::std:
|
||||
*os << ")";
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,15 +28,15 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_REGISTERPROJECTSFORCODECOMPLETIONCOMAND_H
|
||||
#define CODEMODELBACKEND_REGISTERPROJECTSFORCODECOMPLETIONCOMAND_H
|
||||
#ifndef CLANGBACKEND_REGISTERPROJECTSFORCODECOMPLETIONCOMAND_H
|
||||
#define CLANGBACKEND_REGISTERPROJECTSFORCODECOMPLETIONCOMAND_H
|
||||
|
||||
#include <QMetaType>
|
||||
#include <QVector>
|
||||
|
||||
#include "projectpartcontainer.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT RegisterProjectPartsForCodeCompletionCommand
|
||||
{
|
||||
@@ -62,8 +62,8 @@ CMBIPC_EXPORT bool operator<(const RegisterProjectPartsForCodeCompletionCommand
|
||||
|
||||
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const RegisterProjectPartsForCodeCompletionCommand &command);
|
||||
void PrintTo(const RegisterProjectPartsForCodeCompletionCommand &command, ::std::ostream* os);
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Q_DECLARE_METATYPE(CodeModelBackEnd::RegisterProjectPartsForCodeCompletionCommand)
|
||||
Q_DECLARE_METATYPE(ClangBackEnd::RegisterProjectPartsForCodeCompletionCommand)
|
||||
|
||||
#endif // CODEMODELBACKEND_REGISTERPROJECTSFORCODECOMPLETIONCOMAND_H
|
||||
#endif // CLANGBACKEND_REGISTERPROJECTSFORCODECOMPLETIONCOMAND_H
|
||||
@@ -36,9 +36,9 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include <container_common.h>
|
||||
#include "container_common.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
RegisterTranslationUnitForCodeCompletionCommand::RegisterTranslationUnitForCodeCompletionCommand(const QVector<FileContainer> &fileContainers)
|
||||
: fileContainers_(fileContainers)
|
||||
@@ -96,5 +96,5 @@ void PrintTo(const RegisterTranslationUnitForCodeCompletionCommand &command, ::s
|
||||
*os << ")";
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,15 +28,15 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_REGISTERFILEFORCODECOMPLETION_H
|
||||
#define CODEMODELBACKEND_REGISTERFILEFORCODECOMPLETION_H
|
||||
#ifndef CLANGBACKEND_REGISTERFILEFORCODECOMPLETION_H
|
||||
#define CLANGBACKEND_REGISTERFILEFORCODECOMPLETION_H
|
||||
|
||||
#include <qmetatype.h>
|
||||
|
||||
#include <QVector>
|
||||
#include "filecontainer.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT RegisterTranslationUnitForCodeCompletionCommand
|
||||
{
|
||||
@@ -62,8 +62,8 @@ CMBIPC_EXPORT bool operator<(const RegisterTranslationUnitForCodeCompletionComma
|
||||
|
||||
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const RegisterTranslationUnitForCodeCompletionCommand &command);
|
||||
void PrintTo(const RegisterTranslationUnitForCodeCompletionCommand &command, ::std::ostream* os);
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Q_DECLARE_METATYPE(CodeModelBackEnd::RegisterTranslationUnitForCodeCompletionCommand)
|
||||
Q_DECLARE_METATYPE(ClangBackEnd::RegisterTranslationUnitForCodeCompletionCommand)
|
||||
|
||||
#endif // CODEMODELBACKEND_REGISTERFILEFORCODECOMPLITION_H
|
||||
#endif // CLANGBACKEND_REGISTERFILEFORCODECOMPLITION_H
|
||||
@@ -36,9 +36,9 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include <container_common.h>
|
||||
#include "container_common.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
|
||||
UnregisterProjectPartsForCodeCompletionCommand::UnregisterProjectPartsForCodeCompletionCommand(const Utf8StringVector &filePaths)
|
||||
@@ -97,5 +97,5 @@ void PrintTo(const UnregisterProjectPartsForCodeCompletionCommand &command, ::st
|
||||
*os << ")";
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,16 +28,16 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_UNREGISTERPROJECTSFORCODECOMPLETION_H
|
||||
#define CODEMODELBACKEND_UNREGISTERPROJECTSFORCODECOMPLETION_H
|
||||
#ifndef CLANGBACKEND_UNREGISTERPROJECTSFORCODECOMPLETION_H
|
||||
#define CLANGBACKEND_UNREGISTERPROJECTSFORCODECOMPLETION_H
|
||||
|
||||
#include "codemodelbackendipc_global.h"
|
||||
#include "clangbackendipc_global.h"
|
||||
|
||||
#include <utf8stringvector.h>
|
||||
|
||||
#include <QMetaType>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT UnregisterProjectPartsForCodeCompletionCommand
|
||||
{
|
||||
@@ -64,8 +64,8 @@ CMBIPC_EXPORT bool operator<(const UnregisterProjectPartsForCodeCompletionComman
|
||||
|
||||
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const UnregisterProjectPartsForCodeCompletionCommand &command);
|
||||
void PrintTo(const UnregisterProjectPartsForCodeCompletionCommand &command, ::std::ostream* os);
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Q_DECLARE_METATYPE(CodeModelBackEnd::UnregisterProjectPartsForCodeCompletionCommand)
|
||||
Q_DECLARE_METATYPE(ClangBackEnd::UnregisterProjectPartsForCodeCompletionCommand)
|
||||
|
||||
#endif // CODEMODELBACKEND_UNREGISTERPROJECTSFORCODECOMPLETION_H
|
||||
#endif // CLANGBACKEND_UNREGISTERPROJECTSFORCODECOMPLETION_H
|
||||
@@ -32,15 +32,15 @@
|
||||
|
||||
#include <QtDebug>
|
||||
|
||||
#ifdef CODEMODELBACKEND_TESTS
|
||||
#ifdef CLANGBACKEND_TESTS
|
||||
#include <gtest/gtest-printers.h>
|
||||
#endif
|
||||
|
||||
#include <QDataStream>
|
||||
|
||||
#include <container_common.h>
|
||||
#include "container_common.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
|
||||
UnregisterTranslationUnitsForCodeCompletionCommand::UnregisterTranslationUnitsForCodeCompletionCommand(const QVector<FileContainer> &fileContainers)
|
||||
@@ -89,7 +89,7 @@ QDebug operator<<(QDebug debug, const UnregisterTranslationUnitsForCodeCompletio
|
||||
return debug;
|
||||
}
|
||||
|
||||
#ifdef CODEMODELBACKEND_TESTS
|
||||
#ifdef CLANGBACKEND_TESTS
|
||||
void PrintTo(const UnregisterTranslationUnitsForCodeCompletionCommand &command, ::std::ostream* os)
|
||||
{
|
||||
*os << "UnregisterTranslationUnitsForCodeCompletionCommand(";
|
||||
@@ -102,5 +102,5 @@ void PrintTo(const UnregisterTranslationUnitsForCodeCompletionCommand &command,
|
||||
#endif
|
||||
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,17 +28,17 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_UNRegisterTranslationUnitForCodeCompletionCommand_H
|
||||
#define CODEMODELBACKEND_UNRegisterTranslationUnitForCodeCompletionCommand_H
|
||||
#ifndef CLANGBACKEND_UNRegisterTranslationUnitForCodeCompletionCommand_H
|
||||
#define CLANGBACKEND_UNRegisterTranslationUnitForCodeCompletionCommand_H
|
||||
|
||||
#include "codemodelbackendipc_global.h"
|
||||
#include "clangbackendipc_global.h"
|
||||
|
||||
#include "filecontainer.h"
|
||||
|
||||
#include <QVector>
|
||||
#include <QMetaType>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT UnregisterTranslationUnitsForCodeCompletionCommand
|
||||
{
|
||||
@@ -64,11 +64,11 @@ CMBIPC_EXPORT bool operator==(const UnregisterTranslationUnitsForCodeCompletionC
|
||||
CMBIPC_EXPORT bool operator<(const UnregisterTranslationUnitsForCodeCompletionCommand &first, const UnregisterTranslationUnitsForCodeCompletionCommand &second);
|
||||
|
||||
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const UnregisterTranslationUnitsForCodeCompletionCommand &command);
|
||||
#ifdef CODEMODELBACKEND_TESTS
|
||||
#ifdef CLANGBACKEND_TESTS
|
||||
void PrintTo(const UnregisterTranslationUnitsForCodeCompletionCommand &command, ::std::ostream* os);
|
||||
#endif
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Q_DECLARE_METATYPE(CodeModelBackEnd::UnregisterTranslationUnitsForCodeCompletionCommand)
|
||||
Q_DECLARE_METATYPE(ClangBackEnd::UnregisterTranslationUnitsForCodeCompletionCommand)
|
||||
|
||||
#endif // CODEMODELBACKEND_UNRegisterTranslationUnitForCodeCompletionCommand_H
|
||||
#endif // CLANGBACKEND_UNRegisterTranslationUnitForCodeCompletionCommand_H
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
CodeCompletion::CodeCompletion(const Utf8String &text,
|
||||
const Utf8String &hint,
|
||||
@@ -251,5 +251,5 @@ void PrintTo(CodeCompletion::Availability availability, std::ostream *os)
|
||||
*os << availabilityToString(availability);
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,17 +28,17 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_CODECOMPLETION_H
|
||||
#define CODEMODELBACKEND_CODECOMPLETION_H
|
||||
#ifndef CLANGBACKEND_CODECOMPLETION_H
|
||||
#define CLANGBACKEND_CODECOMPLETION_H
|
||||
|
||||
#include <QMetaType>
|
||||
#include <utf8string.h>
|
||||
|
||||
#include "codecompletionchunk.h"
|
||||
|
||||
#include "codemodelbackendipc_global.h"
|
||||
#include "clangbackendipc_global.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT CodeCompletion
|
||||
{
|
||||
@@ -134,8 +134,8 @@ CMBIPC_EXPORT QDebug operator<<(QDebug debug, CodeCompletion::Kind kind);
|
||||
void PrintTo(const CodeCompletion &command, ::std::ostream* os);
|
||||
void PrintTo(CodeCompletion::Kind kind, ::std::ostream *os);
|
||||
void PrintTo(CodeCompletion::Availability availability, ::std::ostream *os);
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Q_DECLARE_METATYPE(CodeModelBackEnd::CodeCompletion)
|
||||
Q_DECLARE_METATYPE(ClangBackEnd::CodeCompletion)
|
||||
|
||||
#endif // CODEMODELBACKEND_CODECOMPLETION_H
|
||||
#endif // CLANGBACKEND_CODECOMPLETION_H
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
CodeCompletionChunk::CodeCompletionChunk()
|
||||
: kind_(Invalid)
|
||||
@@ -174,5 +174,5 @@ void PrintTo(const CodeCompletionChunk::Kind &kind, ::std::ostream* os)
|
||||
*os << completionChunkKindToString(kind);
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,16 +28,16 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_CODECOMPLETIONCHUNK_H
|
||||
#define CODEMODELBACKEND_CODECOMPLETIONCHUNK_H
|
||||
#ifndef CLANGBACKEND_CODECOMPLETIONCHUNK_H
|
||||
#define CLANGBACKEND_CODECOMPLETIONCHUNK_H
|
||||
|
||||
#include <utf8string.h>
|
||||
|
||||
#include <QVector>
|
||||
|
||||
#include "codemodelbackendipc_global.h"
|
||||
#include "clangbackendipc_global.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT CodeCompletionChunk
|
||||
{
|
||||
@@ -98,8 +98,8 @@ CMBIPC_EXPORT QDebug operator<<(QDebug debug, const CodeCompletionChunk &chunk);
|
||||
void PrintTo(const CodeCompletionChunk &chunk, ::std::ostream* os);
|
||||
void PrintTo(const CodeCompletionChunk::Kind &kind, ::std::ostream* os);
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Q_DECLARE_METATYPE(CodeModelBackEnd::CodeCompletionChunk)
|
||||
Q_DECLARE_METATYPE(ClangBackEnd::CodeCompletionChunk)
|
||||
|
||||
#endif // CODEMODELBACKEND_CODECOMPLETIONCHUNK_H
|
||||
#endif // CLANGBACKEND_CODECOMPLETIONCHUNK_H
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "cmbunregistertranslationunitsforcodecompletioncommand.h"
|
||||
#include "cmbcompletecodecommand.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
namespace {
|
||||
QString currentProcessId()
|
||||
@@ -48,7 +48,7 @@ QString currentProcessId()
|
||||
|
||||
QString connectionName()
|
||||
{
|
||||
return QStringLiteral("CodeModelBackEnd-") + currentProcessId();
|
||||
return QStringLiteral("ClangBackEnd-") + currentProcessId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,12 +198,12 @@ void ConnectionClient::printLocalSocketError(QLocalSocket::LocalSocketError /*so
|
||||
|
||||
void ConnectionClient::printStandardOutput()
|
||||
{
|
||||
qWarning() << "CodeModelBackEnd:" << process_->readAllStandardOutput();
|
||||
qWarning() << "ClangBackEnd:" << process_->readAllStandardOutput();
|
||||
}
|
||||
|
||||
void ConnectionClient::printStandardError()
|
||||
{
|
||||
qWarning() << "CodeModelBackEnd Error:" << process_->readAllStandardError();
|
||||
qWarning() << "ClangBackEnd Error:" << process_->readAllStandardError();
|
||||
}
|
||||
|
||||
void ConnectionClient::finishProcess()
|
||||
@@ -284,5 +284,5 @@ void ConnectionClient::setProcessPath(const QString &processPath)
|
||||
processPath_ = processPath;
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_CONNECTIONCLIENT_H
|
||||
#define CODEMODELBACKEND_CONNECTIONCLIENT_H
|
||||
#ifndef CLANGBACKEND_CONNECTIONCLIENT_H
|
||||
#define CLANGBACKEND_CONNECTIONCLIENT_H
|
||||
|
||||
#include <QLocalSocket>
|
||||
|
||||
@@ -44,7 +44,7 @@ QT_END_NAMESPACE
|
||||
class Utf8String;
|
||||
class Utf8StringVector;
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class FileContainer;
|
||||
|
||||
@@ -108,6 +108,6 @@ private:
|
||||
bool isAliveTimerResetted;
|
||||
};
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
#endif // CODEMODELBACKEND_CONNECTIONCLIENT_H
|
||||
#endif // CLANGBACKEND_CONNECTIONCLIENT_H
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
QString ConnectionServer::connectionName;
|
||||
|
||||
@@ -146,5 +146,5 @@ void ConnectionServer::exitApplicationIfNoSockedIsConnected()
|
||||
QCoreApplication::exit();
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_CONNECTIONSERVER_H
|
||||
#define CODEMODELBACKEND_CONNECTIONSERVER_H
|
||||
#ifndef CLANGBACKEND_CONNECTIONSERVER_H
|
||||
#define CLANGBACKEND_CONNECTIONSERVER_H
|
||||
|
||||
#include <QLocalServer>
|
||||
#include <ipcclientproxy.h>
|
||||
#include <vector>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class IpcServerInterface;
|
||||
class IpcClientProxy;
|
||||
@@ -78,6 +78,6 @@ private:
|
||||
int aliveTimerId;
|
||||
};
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
#endif // CODEMODELBACKEND_CONNECTIONSERVER_H
|
||||
#endif // CLANGBACKEND_CONNECTIONSERVER_H
|
||||
@@ -32,7 +32,7 @@
|
||||
#define CONTAINER_COMMON_H
|
||||
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
template <typename Container>
|
||||
bool compareContainer(const Container &first, const Container &second)
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
FileContainer::FileContainer(const Utf8String &fileName,
|
||||
const Utf8String &projectPartId,
|
||||
@@ -132,5 +132,5 @@ void PrintTo(const FileContainer &container, ::std::ostream* os)
|
||||
*os << ")";
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,16 +28,16 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_FILECONTAINER_H
|
||||
#define CODEMODELBACKEND_FILECONTAINER_H
|
||||
#ifndef CLANGBACKEND_FILECONTAINER_H
|
||||
#define CLANGBACKEND_FILECONTAINER_H
|
||||
|
||||
#include <qmetatype.h>
|
||||
|
||||
#include <utf8string.h>
|
||||
|
||||
#include <codemodelbackendipc_global.h>
|
||||
#include <clangbackendipc_global.h>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT FileContainer
|
||||
{
|
||||
@@ -72,8 +72,8 @@ CMBIPC_EXPORT bool operator<(const FileContainer &first, const FileContainer &se
|
||||
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const FileContainer &container);
|
||||
void PrintTo(const FileContainer &container, ::std::ostream* os);
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Q_DECLARE_METATYPE(CodeModelBackEnd::FileContainer)
|
||||
Q_DECLARE_METATYPE(ClangBackEnd::FileContainer)
|
||||
|
||||
#endif // CODEMODELBACKEND_FILECONTAINER_H
|
||||
#endif // CLANGBACKEND_FILECONTAINER_H
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include <QtDebug>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
void IpcClientDispatcher::addClient(IpcClientInterface *client)
|
||||
{
|
||||
@@ -74,5 +74,5 @@ void IpcClientDispatcher::projectPartsDoNotExist(const ProjectPartsDoNotExistCom
|
||||
client->projectPartsDoNotExist(command);
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,16 +28,16 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_IPCCLIENTDISPATCHER_H
|
||||
#define CODEMODELBACKEND_IPCCLIENTDISPATCHER_H
|
||||
#ifndef CLANGBACKEND_IPCCLIENTDISPATCHER_H
|
||||
#define CLANGBACKEND_IPCCLIENTDISPATCHER_H
|
||||
|
||||
#include "ipcclientinterface.h"
|
||||
|
||||
#include <QVector>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT IpcClientDispatcher : public CodeModelBackEnd::IpcClientInterface
|
||||
class CMBIPC_EXPORT IpcClientDispatcher : public ClangBackEnd::IpcClientInterface
|
||||
{
|
||||
public:
|
||||
void addClient(IpcClientInterface *client);
|
||||
@@ -53,6 +53,6 @@ private:
|
||||
QVector<IpcClientInterface*> clients;
|
||||
};
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
#endif // CODEMODELBACKEND_IPCCLIENTDISPATCHER_H
|
||||
#endif // CLANGBACKEND_IPCCLIENTDISPATCHER_H
|
||||
@@ -38,16 +38,16 @@
|
||||
#include "translationunitdoesnotexistcommand.h"
|
||||
#include "projectpartsdonotexistcommand.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
|
||||
void IpcClientInterface::dispatch(const QVariant &command)
|
||||
{
|
||||
static const int aliveCommandType = QMetaType::type("CodeModelBackEnd::AliveCommand");
|
||||
static const int echoCommandType = QMetaType::type("CodeModelBackEnd::EchoCommand");
|
||||
static const int codeCompletedCommandType = QMetaType::type("CodeModelBackEnd::CodeCompletedCommand");
|
||||
static const int translationUnitDoesNotExistCommand = QMetaType::type("CodeModelBackEnd::TranslationUnitDoesNotExistCommand");
|
||||
static const int projectPartsDoNotExistCommand = QMetaType::type("CodeModelBackEnd::ProjectPartsDoNotExistCommand");
|
||||
static const int aliveCommandType = QMetaType::type("ClangBackEnd::AliveCommand");
|
||||
static const int echoCommandType = QMetaType::type("ClangBackEnd::EchoCommand");
|
||||
static const int codeCompletedCommandType = QMetaType::type("ClangBackEnd::CodeCompletedCommand");
|
||||
static const int translationUnitDoesNotExistCommand = QMetaType::type("ClangBackEnd::TranslationUnitDoesNotExistCommand");
|
||||
static const int projectPartsDoNotExistCommand = QMetaType::type("ClangBackEnd::ProjectPartsDoNotExistCommand");
|
||||
|
||||
int type = command.userType();
|
||||
|
||||
@@ -65,5 +65,5 @@ void IpcClientInterface::dispatch(const QVariant &command)
|
||||
qWarning() << "Unknown IpcClientCommand";
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,12 +28,12 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_IPCCLIENTINTERFACE_H
|
||||
#define CODEMODELBACKEND_IPCCLIENTINTERFACE_H
|
||||
#ifndef CLANGBACKEND_IPCCLIENTINTERFACE_H
|
||||
#define CLANGBACKEND_IPCCLIENTINTERFACE_H
|
||||
|
||||
#include "ipcinterface.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class IpcServerInterface;
|
||||
class RegisterTranslationUnitForCodeCompletionCommand;
|
||||
@@ -58,6 +58,6 @@ public:
|
||||
virtual void projectPartsDoNotExist(const ProjectPartsDoNotExistCommand &command) = 0;
|
||||
};
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
#endif // CODEMODELBACKEND_IPCCLIENTINTERFACE_H
|
||||
#endif // CLANGBACKEND_IPCCLIENTINTERFACE_H
|
||||
@@ -44,7 +44,7 @@
|
||||
#include "translationunitdoesnotexistcommand.h"
|
||||
#include "projectpartsdonotexistcommand.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
IpcClientProxy::IpcClientProxy(IpcServerInterface *server, QIODevice *ioDevice)
|
||||
: writeCommandBlock(ioDevice),
|
||||
@@ -110,5 +110,5 @@ bool IpcClientProxy::isUsingThatIoDevice(QIODevice *ioDevice) const
|
||||
return this->ioDevice == ioDevice;
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "codemodelbackendipc_global.h"
|
||||
#include "clangbackendipc_global.h"
|
||||
#include "ipcclientinterface.h"
|
||||
|
||||
#include "writecommandblock.h"
|
||||
@@ -46,7 +46,7 @@ class QLocalServer;
|
||||
class QIODevice;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT IpcClientProxy : public IpcClientInterface
|
||||
{
|
||||
@@ -69,12 +69,12 @@ public:
|
||||
bool isUsingThatIoDevice(QIODevice *ioDevice) const;
|
||||
|
||||
private:
|
||||
CodeModelBackEnd::WriteCommandBlock writeCommandBlock;
|
||||
CodeModelBackEnd::ReadCommandBlock readCommandBlock;
|
||||
ClangBackEnd::WriteCommandBlock writeCommandBlock;
|
||||
ClangBackEnd::ReadCommandBlock readCommandBlock;
|
||||
IpcServerInterface *server = nullptr;
|
||||
QIODevice *ioDevice = nullptr;
|
||||
};
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
#endif // CODELMODELBACKEND_IPCCLIENTPROXY_H
|
||||
@@ -30,11 +30,11 @@
|
||||
|
||||
#include "ipcinterface.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
IpcInterface::~IpcInterface()
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_IPCINTERFACE_H
|
||||
#define CODEMODELBACKEND_IPCINTERFACE_H
|
||||
#ifndef CLANGBACKEND_IPCINTERFACE_H
|
||||
#define CLANGBACKEND_IPCINTERFACE_H
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
@@ -37,9 +37,9 @@ QT_BEGIN_NAMESPACE
|
||||
class QVariant;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "codemodelbackendipc_global.h"
|
||||
#include "clangbackendipc_global.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT IpcInterface
|
||||
{
|
||||
@@ -48,6 +48,6 @@ public:
|
||||
virtual void dispatch(const QVariant &command) = 0;
|
||||
};
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
#endif // CODEMODELBACKEND_IPCINTERFACE_H
|
||||
#endif // CLANGBACKEND_IPCINTERFACE_H
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "ipcserver.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
IpcServer::IpcServer()
|
||||
{
|
||||
@@ -42,5 +42,5 @@ IpcServer::~IpcServer()
|
||||
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,12 +28,12 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_IPCSERVER_H
|
||||
#define CODEMODELBACKEND_IPCSERVER_H
|
||||
#ifndef CLANGBACKEND_IPCSERVER_H
|
||||
#define CLANGBACKEND_IPCSERVER_H
|
||||
|
||||
#include "ipcserverinterface.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class IpcServer : public IpcServerInterface
|
||||
{
|
||||
@@ -42,6 +42,6 @@ public:
|
||||
~IpcServer();
|
||||
};
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
#endif // CODEMODELBACKEND_IPCSERVER_H
|
||||
#endif // CLANGBACKEND_IPCSERVER_H
|
||||
@@ -39,16 +39,16 @@
|
||||
#include "cmbunregisterprojectsforcodecompletioncommand.h"
|
||||
#include "cmbcompletecodecommand.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
void IpcServerInterface::dispatch(const QVariant &command)
|
||||
{
|
||||
static const int endCommandType = QMetaType::type("CodeModelBackEnd::EndCommand");
|
||||
static const int registerTranslationUnitsForCodeCompletionCommandType = QMetaType::type("CodeModelBackEnd::RegisterTranslationUnitForCodeCompletionCommand");
|
||||
static const int unregisterTranslationUnitsForCodeCompletionCommandType = QMetaType::type("CodeModelBackEnd::UnregisterTranslationUnitsForCodeCompletionCommand");
|
||||
static const int registerProjectPartsForCodeCompletionCommandType = QMetaType::type("CodeModelBackEnd::RegisterProjectPartsForCodeCompletionCommand");
|
||||
static const int unregisterProjectPartsForCodeCompletionCommandType = QMetaType::type("CodeModelBackEnd::UnregisterProjectPartsForCodeCompletionCommand");
|
||||
static const int completeCodeCommandType = QMetaType::type("CodeModelBackEnd::CompleteCodeCommand");
|
||||
static const int endCommandType = QMetaType::type("ClangBackEnd::EndCommand");
|
||||
static const int registerTranslationUnitsForCodeCompletionCommandType = QMetaType::type("ClangBackEnd::RegisterTranslationUnitForCodeCompletionCommand");
|
||||
static const int unregisterTranslationUnitsForCodeCompletionCommandType = QMetaType::type("ClangBackEnd::UnregisterTranslationUnitsForCodeCompletionCommand");
|
||||
static const int registerProjectPartsForCodeCompletionCommandType = QMetaType::type("ClangBackEnd::RegisterProjectPartsForCodeCompletionCommand");
|
||||
static const int unregisterProjectPartsForCodeCompletionCommandType = QMetaType::type("ClangBackEnd::UnregisterProjectPartsForCodeCompletionCommand");
|
||||
static const int completeCodeCommandType = QMetaType::type("ClangBackEnd::CompleteCodeCommand");
|
||||
|
||||
int type = command.userType();
|
||||
|
||||
@@ -83,5 +83,5 @@ IpcClientInterface *IpcServerInterface::client()
|
||||
return &clientDispatcher;
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_IPCSERVERINTERFACE_H
|
||||
#define CODEMODELBACKEND_IPCSERVERINTERFACE_H
|
||||
#ifndef CLANGBACKEND_IPCSERVERINTERFACE_H
|
||||
#define CLANGBACKEND_IPCSERVERINTERFACE_H
|
||||
|
||||
#include "ipcinterface.h"
|
||||
|
||||
#include "ipcclientdispatcher.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class IpcClientInterface;
|
||||
|
||||
@@ -60,6 +60,6 @@ private:
|
||||
IpcClientDispatcher clientDispatcher;
|
||||
};
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
#endif // CODEMODELBACKEND_IPCSERVERINTERFACE_H
|
||||
#endif // CLANGBACKEND_IPCSERVERINTERFACE_H
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
#include <ipcclientinterface.h>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
IpcServerProxy::IpcServerProxy(IpcClientInterface *client, QIODevice *ioDevice)
|
||||
: writeCommandBlock(ioDevice),
|
||||
@@ -96,5 +96,5 @@ void IpcServerProxy::completeCode(const CompleteCodeCommand &command)
|
||||
writeCommandBlock.write(QVariant::fromValue(command));
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_IPCSERVERPROXY_H
|
||||
#define CODEMODELBACKEND_IPCSERVERPROXY_H
|
||||
#ifndef CLANGBACKEND_IPCSERVERPROXY_H
|
||||
#define CLANGBACKEND_IPCSERVERPROXY_H
|
||||
|
||||
#include <qglobal.h>
|
||||
#include <QTimer>
|
||||
@@ -47,7 +47,7 @@ class QLocalServer;
|
||||
class QLocalSocket;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT IpcServerProxy : public IpcServerInterface
|
||||
{
|
||||
@@ -68,11 +68,11 @@ public:
|
||||
void resetCounter();
|
||||
|
||||
private:
|
||||
CodeModelBackEnd::WriteCommandBlock writeCommandBlock;
|
||||
CodeModelBackEnd::ReadCommandBlock readCommandBlock;
|
||||
ClangBackEnd::WriteCommandBlock writeCommandBlock;
|
||||
ClangBackEnd::ReadCommandBlock readCommandBlock;
|
||||
IpcClientInterface *client;
|
||||
};
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
#endif // CODEMODELBACKEND_IPCSERVERPROXY_H
|
||||
#endif // CLANGBACKEND_IPCSERVERPROXY_H
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
ProjectPartContainer::ProjectPartContainer(const Utf8String &projectPathId,
|
||||
const Utf8StringVector &arguments)
|
||||
@@ -103,5 +103,5 @@ void PrintTo(const ProjectPartContainer &container, ::std::ostream* os)
|
||||
}
|
||||
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,16 +28,16 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_PROJECTCONTAINER_H
|
||||
#define CODEMODELBACKEND_PROJECTCONTAINER_H
|
||||
#ifndef CLANGBACKEND_PROJECTCONTAINER_H
|
||||
#define CLANGBACKEND_PROJECTCONTAINER_H
|
||||
|
||||
#include <QMetaType>
|
||||
|
||||
#include <utf8stringvector.h>
|
||||
|
||||
#include <codemodelbackendipc_global.h>
|
||||
#include <clangbackendipc_global.h>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT ProjectPartContainer
|
||||
{
|
||||
@@ -66,8 +66,8 @@ CMBIPC_EXPORT bool operator<(const ProjectPartContainer &first, const ProjectPar
|
||||
QDebug operator<<(QDebug debug, const ProjectPartContainer &container);
|
||||
void PrintTo(const ProjectPartContainer &container, ::std::ostream* os);
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Q_DECLARE_METATYPE(CodeModelBackEnd::ProjectPartContainer)
|
||||
Q_DECLARE_METATYPE(ClangBackEnd::ProjectPartContainer)
|
||||
|
||||
#endif // CODEMODELBACKEND_PROJECTCONTAINER_H
|
||||
#endif // CLANGBACKEND_PROJECTCONTAINER_H
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
ProjectPartsDoNotExistCommand::ProjectPartsDoNotExistCommand(const Utf8StringVector &projectPartIds)
|
||||
: projectPartIds_(projectPartIds)
|
||||
@@ -95,5 +95,5 @@ void PrintTo(const ProjectPartsDoNotExistCommand &command, ::std::ostream* os)
|
||||
}
|
||||
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,16 +28,16 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_PROJECTPARTSDONOTEXISTCOMMAND_H
|
||||
#define CODEMODELBACKEND_PROJECTPARTSDONOTEXISTCOMMAND_H
|
||||
#ifndef CLANGBACKEND_PROJECTPARTSDONOTEXISTCOMMAND_H
|
||||
#define CLANGBACKEND_PROJECTPARTSDONOTEXISTCOMMAND_H
|
||||
|
||||
#include <QMetaType>
|
||||
|
||||
#include <utf8stringvector.h>
|
||||
|
||||
#include "codemodelbackendipc_global.h"
|
||||
#include "clangbackendipc_global.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT ProjectPartsDoNotExistCommand
|
||||
{
|
||||
@@ -65,8 +65,8 @@ CMBIPC_EXPORT bool operator<(const ProjectPartsDoNotExistCommand &first, const P
|
||||
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const ProjectPartsDoNotExistCommand &command);
|
||||
void PrintTo(const ProjectPartsDoNotExistCommand &command, ::std::ostream* os);
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Q_DECLARE_METATYPE(CodeModelBackEnd::ProjectPartsDoNotExistCommand)
|
||||
Q_DECLARE_METATYPE(ClangBackEnd::ProjectPartsDoNotExistCommand)
|
||||
|
||||
#endif // CODEMODELBACKEND_PROJECTPARTSDONOTEXISTCOMMAND_H
|
||||
#endif // CLANGBACKEND_PROJECTPARTSDONOTEXISTCOMMAND_H
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <QVariant>
|
||||
#include <QtDebug>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
ReadCommandBlock::ReadCommandBlock(QIODevice *ioDevice)
|
||||
: ioDevice(ioDevice),
|
||||
@@ -109,5 +109,5 @@ bool ReadCommandBlock::isTheWholeCommandReadable(QDataStream &in)
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_READCOMMANDBLOCK_H
|
||||
#define CODEMODELBACKEND_READCOMMANDBLOCK_H
|
||||
#ifndef CLANGBACKEND_READCOMMANDBLOCK_H
|
||||
#define CLANGBACKEND_READCOMMANDBLOCK_H
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
@@ -39,7 +39,7 @@ class QDataStream;
|
||||
class QIODevice;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class ReadCommandBlock
|
||||
{
|
||||
@@ -61,6 +61,6 @@ private:
|
||||
qint32 blockSize;
|
||||
};
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
#endif // CODEMODELBACKEND_READCOMMANDBLOCK_H
|
||||
#endif // CLANGBACKEND_READCOMMANDBLOCK_H
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
TranslationUnitDoesNotExistCommand::TranslationUnitDoesNotExistCommand(const FileContainer &fileContainer)
|
||||
: fileContainer_(fileContainer)
|
||||
@@ -108,5 +108,5 @@ void PrintTo(const TranslationUnitDoesNotExistCommand &command, ::std::ostream*
|
||||
*os << output.toUtf8().constData();
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_TRANSLATIONUNITDOESNOTEXISTSCOMMAND_H
|
||||
#define CODEMODELBACKEND_TRANSLATIONUNITDOESNOTEXISTSCOMMAND_H
|
||||
#ifndef CLANGBACKEND_TRANSLATIONUNITDOESNOTEXISTSCOMMAND_H
|
||||
#define CLANGBACKEND_TRANSLATIONUNITDOESNOTEXISTSCOMMAND_H
|
||||
|
||||
#include <QMetaType>
|
||||
|
||||
#include "filecontainer.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT TranslationUnitDoesNotExistCommand
|
||||
{
|
||||
@@ -66,8 +66,8 @@ CMBIPC_EXPORT bool operator<(const TranslationUnitDoesNotExistCommand &first, co
|
||||
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const TranslationUnitDoesNotExistCommand &command);
|
||||
void PrintTo(const TranslationUnitDoesNotExistCommand &command, ::std::ostream* os);
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Q_DECLARE_METATYPE(CodeModelBackEnd::TranslationUnitDoesNotExistCommand)
|
||||
Q_DECLARE_METATYPE(ClangBackEnd::TranslationUnitDoesNotExistCommand)
|
||||
|
||||
#endif // CODEMODELBACKEND_TRANSLATIONUNITDOESNOTEXISTSCOMMAND_H
|
||||
#endif // CLANGBACKEND_TRANSLATIONUNITDOESNOTEXISTSCOMMAND_H
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <QVariant>
|
||||
#include <QtDebug>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
WriteCommandBlock::WriteCommandBlock(QIODevice *ioDevice)
|
||||
: commandCounter(0),
|
||||
@@ -74,5 +74,5 @@ void WriteCommandBlock::resetCounter()
|
||||
}
|
||||
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_WRITECOMMANDBLOCK_H
|
||||
#define CODEMODELBACKEND_WRITECOMMANDBLOCK_H
|
||||
#ifndef CLANGBACKEND_WRITECOMMANDBLOCK_H
|
||||
#define CLANGBACKEND_WRITECOMMANDBLOCK_H
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
@@ -39,7 +39,7 @@ class QDataStream;
|
||||
class QIODevice;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class WriteCommandBlock
|
||||
{
|
||||
@@ -57,6 +57,6 @@ private:
|
||||
QIODevice *ioDevice;
|
||||
};
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
#endif // CODEMODELBACKEND_WRITECOMMANDBLOCK_H
|
||||
#endif // CLANGBACKEND_WRITECOMMANDBLOCK_H
|
||||
@@ -1,2 +0,0 @@
|
||||
include(../../qtcreatorlibrary.pri)
|
||||
include(codemodelbackendipc-lib.pri)
|
||||
@@ -1,3 +0,0 @@
|
||||
QTC_LIB_NAME = Codemodelbackendipc
|
||||
QTC_LIB_DEPENDS += sqlite
|
||||
INCLUDEPATH *= $$IDE_SOURCE_TREE/src/libs/codemodelbackendipc
|
||||
@@ -1,37 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://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 Digia. For licensing terms and
|
||||
** conditions see http://www.qt.io/licensing. For further information
|
||||
** use the contact form at http://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 or version 3 as published by the Free
|
||||
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
||||
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
||||
** following information to ensure the GNU Lesser General Public License
|
||||
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Digia gives you certain additional
|
||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "codecompletion.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
void registerTypes()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ SUBDIRS = \
|
||||
ssh \
|
||||
timeline \
|
||||
sqlite \
|
||||
codemodelbackendipc
|
||||
clangbackendipc
|
||||
|
||||
for(l, SUBDIRS) {
|
||||
QTC_LIB_DEPENDS =
|
||||
|
||||
@@ -4,7 +4,7 @@ Project {
|
||||
name: "Libs"
|
||||
references: [
|
||||
"aggregation/aggregation.qbs",
|
||||
"codemodelbackendipc/codemodelbackendipc.qbs",
|
||||
"clangbackendipc/clangbackendipc.qbs",
|
||||
"cplusplus/cplusplus.qbs",
|
||||
"extensionsystem/extensionsystem.qbs",
|
||||
"glsl/glsl.qbs",
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "codemodelbackendipcintegration.h"
|
||||
#include "clangbackendipcintegration.h"
|
||||
|
||||
#include "clangcompletion.h"
|
||||
#include "clangmodelmanagersupport.h"
|
||||
@@ -49,16 +49,16 @@
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <codemodelbackendipc/cmbcodecompletedcommand.h>
|
||||
#include <codemodelbackendipc/cmbcompletecodecommand.h>
|
||||
#include <codemodelbackendipc/cmbechocommand.h>
|
||||
#include <codemodelbackendipc/cmbregistertranslationunitsforcodecompletioncommand.h>
|
||||
#include <codemodelbackendipc/cmbregisterprojectsforcodecompletioncommand.h>
|
||||
#include <codemodelbackendipc/cmbunregistertranslationunitsforcodecompletioncommand.h>
|
||||
#include <codemodelbackendipc/cmbunregisterprojectsforcodecompletioncommand.h>
|
||||
#include <codemodelbackendipc/cmbcommands.h>
|
||||
#include <codemodelbackendipc/projectpartsdonotexistcommand.h>
|
||||
#include <codemodelbackendipc/translationunitdoesnotexistcommand.h>
|
||||
#include <clangbackendipc/cmbcodecompletedcommand.h>
|
||||
#include <clangbackendipc/cmbcompletecodecommand.h>
|
||||
#include <clangbackendipc/cmbechocommand.h>
|
||||
#include <clangbackendipc/cmbregistertranslationunitsforcodecompletioncommand.h>
|
||||
#include <clangbackendipc/cmbregisterprojectsforcodecompletioncommand.h>
|
||||
#include <clangbackendipc/cmbunregistertranslationunitsforcodecompletioncommand.h>
|
||||
#include <clangbackendipc/cmbunregisterprojectsforcodecompletioncommand.h>
|
||||
#include <clangbackendipc/cmbcommands.h>
|
||||
#include <clangbackendipc/projectpartsdonotexistcommand.h>
|
||||
#include <clangbackendipc/translationunitdoesnotexistcommand.h>
|
||||
|
||||
#include <cplusplus/Icons.h>
|
||||
|
||||
@@ -71,7 +71,7 @@ static Q_LOGGING_CATEGORY(log, "qtc.clangcodemodel.ipc")
|
||||
using namespace CPlusPlus;
|
||||
using namespace ClangCodeModel;
|
||||
using namespace ClangCodeModel::Internal;
|
||||
using namespace CodeModelBackEnd;
|
||||
using namespace ClangBackEnd;
|
||||
using namespace TextEditor;
|
||||
|
||||
namespace {
|
||||
@@ -79,7 +79,7 @@ namespace {
|
||||
QString backendProcessPath()
|
||||
{
|
||||
return Core::ICore::libexecPath()
|
||||
+ QStringLiteral("/codemodelbackend")
|
||||
+ QStringLiteral("/clangbackend")
|
||||
+ QStringLiteral(QTC_HOST_EXE_SUFFIX);
|
||||
}
|
||||
|
||||
@@ -164,19 +164,19 @@ void IpcReceiver::projectPartsDoNotExist(const ProjectPartsDoNotExistCommand &co
|
||||
class IpcSender : public IpcSenderInterface
|
||||
{
|
||||
public:
|
||||
IpcSender(CodeModelBackEnd::ConnectionClient &connectionClient)
|
||||
IpcSender(ClangBackEnd::ConnectionClient &connectionClient)
|
||||
: m_connection(connectionClient)
|
||||
{}
|
||||
|
||||
void end() override;
|
||||
void registerTranslationUnitsForCodeCompletion(const CodeModelBackEnd::RegisterTranslationUnitForCodeCompletionCommand &command) override;
|
||||
void unregisterTranslationUnitsForCodeCompletion(const CodeModelBackEnd::UnregisterTranslationUnitsForCodeCompletionCommand &command) override;
|
||||
void registerProjectPartsForCodeCompletion(const CodeModelBackEnd::RegisterProjectPartsForCodeCompletionCommand &command) override;
|
||||
void unregisterProjectPartsForCodeCompletion(const CodeModelBackEnd::UnregisterProjectPartsForCodeCompletionCommand &command) override;
|
||||
void completeCode(const CodeModelBackEnd::CompleteCodeCommand &command) override;
|
||||
void registerTranslationUnitsForCodeCompletion(const ClangBackEnd::RegisterTranslationUnitForCodeCompletionCommand &command) override;
|
||||
void unregisterTranslationUnitsForCodeCompletion(const ClangBackEnd::UnregisterTranslationUnitsForCodeCompletionCommand &command) override;
|
||||
void registerProjectPartsForCodeCompletion(const ClangBackEnd::RegisterProjectPartsForCodeCompletionCommand &command) override;
|
||||
void unregisterProjectPartsForCodeCompletion(const ClangBackEnd::UnregisterProjectPartsForCodeCompletionCommand &command) override;
|
||||
void completeCode(const ClangBackEnd::CompleteCodeCommand &command) override;
|
||||
|
||||
private:
|
||||
CodeModelBackEnd::ConnectionClient &m_connection;
|
||||
ClangBackEnd::ConnectionClient &m_connection;
|
||||
};
|
||||
|
||||
void IpcSender::end()
|
||||
@@ -243,12 +243,12 @@ void IpcCommunicator::initializeBackend()
|
||||
}
|
||||
QElapsedTimer timer; timer.start();
|
||||
|
||||
const QString codeModelBackEndProcessPath = backendProcessPath();
|
||||
qCDebug(log) << "Starting" << codeModelBackEndProcessPath;
|
||||
QTC_ASSERT(QFileInfo(codeModelBackEndProcessPath).exists(), return);
|
||||
const QString clangBackEndProcessPath = backendProcessPath();
|
||||
qCDebug(log) << "Starting" << clangBackEndProcessPath;
|
||||
QTC_ASSERT(QFileInfo(clangBackEndProcessPath).exists(), return);
|
||||
|
||||
m_connection.setProcessAliveTimerInterval(10 * 1000);
|
||||
m_connection.setProcessPath(codeModelBackEndProcessPath);
|
||||
m_connection.setProcessPath(clangBackEndProcessPath);
|
||||
|
||||
connect(&m_connection, &ConnectionClient::processRestarted,
|
||||
this, &IpcCommunicator::onBackendRestarted);
|
||||
@@ -264,7 +264,7 @@ void IpcCommunicator::initializeBackend()
|
||||
void IpcCommunicator::registerEmptyProjectForProjectLessFiles()
|
||||
{
|
||||
QTC_CHECK(m_connection.isConnected());
|
||||
registerProjectPartsForCodeCompletion({CodeModelBackEnd::ProjectPartContainer(
|
||||
registerProjectPartsForCodeCompletion({ClangBackEnd::ProjectPartContainer(
|
||||
Utf8String(),
|
||||
Utf8StringVector())});
|
||||
}
|
||||
@@ -308,18 +308,18 @@ static QStringList projectPartCommandLine(const CppTools::ProjectPart::Ptr &proj
|
||||
return options;
|
||||
}
|
||||
|
||||
static CodeModelBackEnd::ProjectPartContainer toProjectPartContainer(
|
||||
static ClangBackEnd::ProjectPartContainer toProjectPartContainer(
|
||||
const CppTools::ProjectPart::Ptr &projectPart)
|
||||
{
|
||||
const QStringList arguments = projectPartCommandLine(projectPart);
|
||||
return CodeModelBackEnd::ProjectPartContainer(projectPart->projectFile,
|
||||
return ClangBackEnd::ProjectPartContainer(projectPart->projectFile,
|
||||
Utf8StringVector(arguments));
|
||||
}
|
||||
|
||||
static QVector<CodeModelBackEnd::ProjectPartContainer> toProjectPartContainers(
|
||||
static QVector<ClangBackEnd::ProjectPartContainer> toProjectPartContainers(
|
||||
const QList<CppTools::ProjectPart::Ptr> projectParts)
|
||||
{
|
||||
QVector<CodeModelBackEnd::ProjectPartContainer> projectPartContainers;
|
||||
QVector<ClangBackEnd::ProjectPartContainer> projectPartContainers;
|
||||
projectPartContainers.reserve(projectParts.size());
|
||||
foreach (const CppTools::ProjectPart::Ptr &projectPart, projectParts)
|
||||
projectPartContainers << toProjectPartContainer(projectPart);
|
||||
@@ -346,7 +346,7 @@ void IpcCommunicator::updateUnsavedFile(const QString &filePath, const QByteArra
|
||||
|
||||
// TODO: Send new only if changed
|
||||
registerFilesForCodeCompletion({
|
||||
CodeModelBackEnd::FileContainer(filePath,
|
||||
ClangBackEnd::FileContainer(filePath,
|
||||
projectFilePath,
|
||||
Utf8String::fromByteArray(contents),
|
||||
hasUnsavedContent)
|
||||
@@ -363,7 +363,7 @@ void IpcCommunicator::updateUnsavedFileIfNotCurrentDocument(Core::IDocument *doc
|
||||
|
||||
void IpcCommunicator::onBackendRestarted()
|
||||
{
|
||||
qWarning("Codemodelbackend finished unexpectedly, restarted.");
|
||||
qWarning("Clang back end finished unexpectedly, restarted.");
|
||||
qCDebug(log) << "Backend restarted, re-initializing with project data and unsaved files.";
|
||||
|
||||
m_ipcReceiver.deleteAndClearWaitingAssistProcessors();
|
||||
@@ -28,15 +28,15 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CLANGCODEMODEL_INTERNAL_CODEMODELBACKENDIPCINTEGRATION_H
|
||||
#define CLANGCODEMODEL_INTERNAL_CODEMODELBACKENDIPCINTEGRATION_H
|
||||
#ifndef CLANGCODEMODEL_INTERNAL_CLANGBACKENDIPCINTEGRATION_H
|
||||
#define CLANGCODEMODEL_INTERNAL_CLANGBACKENDIPCINTEGRATION_H
|
||||
|
||||
#include <cpptools/cppprojects.h>
|
||||
|
||||
#include <codemodelbackendipc/connectionclient.h>
|
||||
#include <codemodelbackendipc/filecontainer.h>
|
||||
#include <codemodelbackendipc/ipcclientinterface.h>
|
||||
#include <codemodelbackendipc/projectpartcontainer.h>
|
||||
#include <clangbackendipc/connectionclient.h>
|
||||
#include <clangbackendipc/filecontainer.h>
|
||||
#include <clangbackendipc/ipcclientinterface.h>
|
||||
#include <clangbackendipc/projectpartcontainer.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <QSharedPointer>
|
||||
@@ -58,7 +58,7 @@ class ModelManagerSupportClang;
|
||||
|
||||
class ClangCompletionAssistProcessor;
|
||||
|
||||
class IpcReceiver : public CodeModelBackEnd::IpcClientInterface
|
||||
class IpcReceiver : public ClangBackEnd::IpcClientInterface
|
||||
{
|
||||
public:
|
||||
IpcReceiver();
|
||||
@@ -73,11 +73,11 @@ public:
|
||||
|
||||
private:
|
||||
void alive() override;
|
||||
void echo(const CodeModelBackEnd::EchoCommand &command) override;
|
||||
void codeCompleted(const CodeModelBackEnd::CodeCompletedCommand &command) override;
|
||||
void echo(const ClangBackEnd::EchoCommand &command) override;
|
||||
void codeCompleted(const ClangBackEnd::CodeCompletedCommand &command) override;
|
||||
|
||||
void translationUnitDoesNotExist(const CodeModelBackEnd::TranslationUnitDoesNotExistCommand &command) override;
|
||||
void projectPartsDoNotExist(const CodeModelBackEnd::ProjectPartsDoNotExistCommand &command) override;
|
||||
void translationUnitDoesNotExist(const ClangBackEnd::TranslationUnitDoesNotExistCommand &command) override;
|
||||
void projectPartsDoNotExist(const ClangBackEnd::ProjectPartsDoNotExistCommand &command) override;
|
||||
|
||||
private:
|
||||
AliveHandler m_aliveHandler;
|
||||
@@ -90,11 +90,11 @@ public:
|
||||
virtual ~IpcSenderInterface() {}
|
||||
|
||||
virtual void end() = 0;
|
||||
virtual void registerTranslationUnitsForCodeCompletion(const CodeModelBackEnd::RegisterTranslationUnitForCodeCompletionCommand &command) = 0;
|
||||
virtual void unregisterTranslationUnitsForCodeCompletion(const CodeModelBackEnd::UnregisterTranslationUnitsForCodeCompletionCommand &command) = 0;
|
||||
virtual void registerProjectPartsForCodeCompletion(const CodeModelBackEnd::RegisterProjectPartsForCodeCompletionCommand &command) = 0;
|
||||
virtual void unregisterProjectPartsForCodeCompletion(const CodeModelBackEnd::UnregisterProjectPartsForCodeCompletionCommand &command) = 0;
|
||||
virtual void completeCode(const CodeModelBackEnd::CompleteCodeCommand &command) = 0;
|
||||
virtual void registerTranslationUnitsForCodeCompletion(const ClangBackEnd::RegisterTranslationUnitForCodeCompletionCommand &command) = 0;
|
||||
virtual void unregisterTranslationUnitsForCodeCompletion(const ClangBackEnd::UnregisterTranslationUnitsForCodeCompletionCommand &command) = 0;
|
||||
virtual void registerProjectPartsForCodeCompletion(const ClangBackEnd::RegisterProjectPartsForCodeCompletionCommand &command) = 0;
|
||||
virtual void unregisterProjectPartsForCodeCompletion(const ClangBackEnd::UnregisterProjectPartsForCodeCompletionCommand &command) = 0;
|
||||
virtual void completeCode(const ClangBackEnd::CompleteCodeCommand &command) = 0;
|
||||
};
|
||||
|
||||
class IpcCommunicator : public QObject
|
||||
@@ -103,8 +103,8 @@ class IpcCommunicator : public QObject
|
||||
|
||||
public:
|
||||
using Ptr = QSharedPointer<IpcCommunicator>;
|
||||
using FileContainers = QVector<CodeModelBackEnd::FileContainer>;
|
||||
using ProjectPartContainers = QVector<CodeModelBackEnd::ProjectPartContainer>;
|
||||
using FileContainers = QVector<ClangBackEnd::FileContainer>;
|
||||
using ProjectPartContainers = QVector<ClangBackEnd::ProjectPartContainer>;
|
||||
|
||||
public:
|
||||
IpcCommunicator();
|
||||
@@ -145,7 +145,7 @@ private:
|
||||
void onEditorAboutToClose(Core::IEditor *editor);
|
||||
|
||||
IpcReceiver m_ipcReceiver;
|
||||
CodeModelBackEnd::ConnectionClient m_connection;
|
||||
ClangBackEnd::ConnectionClient m_connection;
|
||||
QScopedPointer<IpcSenderInterface> m_ipcSender;
|
||||
|
||||
SendMode m_sendMode = RespectSendRequests;
|
||||
@@ -154,4 +154,4 @@ private:
|
||||
} // namespace Internal
|
||||
} // namespace ClangCodeModel
|
||||
|
||||
#endif // CLANGCODEMODEL_INTERNAL_CODEMODELBACKENDIPCINTEGRATION_H
|
||||
#endif // CLANGCODEMODEL_INTERNAL_CLANGBACKENDIPCINTEGRATION_H
|
||||
@@ -22,7 +22,7 @@ SOURCES += \
|
||||
$$PWD/clangprojectsettings.cpp \
|
||||
$$PWD/clangprojectsettingspropertiespage.cpp \
|
||||
$$PWD/clangutils.cpp \
|
||||
$$PWD/codemodelbackendipcintegration.cpp \
|
||||
$$PWD/clangbackendipcintegration.cpp \
|
||||
$$PWD/completionchunkstotextconverter.cpp \
|
||||
$$PWD/completionproposalsbuilder.cpp \
|
||||
$$PWD/cppcreatemarkers.cpp \
|
||||
@@ -53,7 +53,7 @@ HEADERS += \
|
||||
$$PWD/clangprojectsettings.h \
|
||||
$$PWD/clangprojectsettingspropertiespage.h \
|
||||
$$PWD/clangutils.h \
|
||||
$$PWD/codemodelbackendipcintegration.h \
|
||||
$$PWD/clangbackendipcintegration.h \
|
||||
$$PWD/completionchunkstotextconverter.h \
|
||||
$$PWD/completionproposalsbuilder.h \
|
||||
$$PWD/constants.h \
|
||||
|
||||
@@ -12,7 +12,7 @@ QtcPlugin {
|
||||
Depends { name: "ProjectExplorer" }
|
||||
Depends { name: "TextEditor" }
|
||||
Depends { name: "Utils" }
|
||||
Depends { name: "CodeModelBackEndIpc" }
|
||||
Depends { name: "ClangBackEndIpc" }
|
||||
|
||||
pluginTestDepends: [
|
||||
"CppEditor",
|
||||
@@ -152,8 +152,8 @@ QtcPlugin {
|
||||
"clangprojectsettingspropertiespage.ui",
|
||||
"clangutils.cpp",
|
||||
"clangutils.h",
|
||||
"codemodelbackendipcintegration.cpp",
|
||||
"codemodelbackendipcintegration.h",
|
||||
"clangbackendipcintegration.cpp",
|
||||
"clangbackendipcintegration.h",
|
||||
"completionchunkstotextconverter.cpp",
|
||||
"completionchunkstotextconverter.h",
|
||||
"constants.h",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
QTC_PLUGIN_NAME = ClangCodeModel
|
||||
QTC_LIB_DEPENDS += \
|
||||
utils \
|
||||
codemodelbackendipc
|
||||
clangbackendipc
|
||||
QTC_PLUGIN_DEPENDS += \
|
||||
coreplugin \
|
||||
cpptools \
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
#include <QTextCursor>
|
||||
#include <QTextDocument>
|
||||
|
||||
using namespace CodeModelBackEnd;
|
||||
using namespace ClangBackEnd;
|
||||
using namespace ClangCodeModel;
|
||||
using namespace ClangCodeModel::Internal;
|
||||
using namespace CPlusPlus;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#define CPPEDITOR_INTERNAL_CLANGCOMPLETION_H
|
||||
|
||||
#include "clangcompleter.h"
|
||||
#include "codemodelbackendipcintegration.h"
|
||||
#include "clangbackendipcintegration.h"
|
||||
|
||||
#include <cpptools/cppcompletionassistprocessor.h>
|
||||
#include <cpptools/cppcompletionassistprovider.h>
|
||||
@@ -43,7 +43,7 @@
|
||||
#include <texteditor/codeassist/completionassistprovider.h>
|
||||
#include <texteditor/codeassist/ifunctionhintproposalmodel.h>
|
||||
|
||||
#include <codemodelbackendipc/codecompletion.h>
|
||||
#include <clangbackendipc/codecompletion.h>
|
||||
|
||||
#include <QStringList>
|
||||
#include <QTextCursor>
|
||||
@@ -51,7 +51,7 @@
|
||||
namespace ClangCodeModel {
|
||||
namespace Internal {
|
||||
|
||||
using CodeCompletions = QVector<CodeModelBackEnd::CodeCompletion>;
|
||||
using CodeCompletions = QVector<ClangBackEnd::CodeCompletion>;
|
||||
|
||||
class ClangAssistProposalModel;
|
||||
|
||||
@@ -87,16 +87,16 @@ public:
|
||||
void keepCompletionOperator(unsigned compOp) { m_completionOperator = compOp; }
|
||||
|
||||
bool isOverloaded() const;
|
||||
void addOverload(const CodeModelBackEnd::CodeCompletion &ccr);
|
||||
void addOverload(const ClangBackEnd::CodeCompletion &ccr);
|
||||
|
||||
CodeModelBackEnd::CodeCompletion originalItem() const;
|
||||
ClangBackEnd::CodeCompletion originalItem() const;
|
||||
|
||||
bool isCodeCompletion() const;
|
||||
|
||||
private:
|
||||
unsigned m_completionOperator;
|
||||
mutable QChar m_typedChar;
|
||||
QList<CodeModelBackEnd::CodeCompletion> m_overloads;
|
||||
QList<ClangBackEnd::CodeCompletion> m_overloads;
|
||||
};
|
||||
|
||||
class ClangFunctionHintModel : public TextEditor::IFunctionHintProposalModel
|
||||
|
||||
@@ -138,7 +138,7 @@ ClangEditorDocumentProcessor::~ClangEditorDocumentProcessor()
|
||||
|
||||
QTC_ASSERT(m_modelManagerSupport, return);
|
||||
m_modelManagerSupport->ipcCommunicator()->unregisterFilesForCodeCompletion(
|
||||
{CodeModelBackEnd::FileContainer(filePath(), projectFilePath)});
|
||||
{ClangBackEnd::FileContainer(filePath(), projectFilePath)});
|
||||
}
|
||||
|
||||
void ClangEditorDocumentProcessor::run()
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
#include <cpptools/editordocumenthandle.h>
|
||||
#include <projectexplorer/project.h>
|
||||
|
||||
#include <codemodelbackendipc/cmbregisterprojectsforcodecompletioncommand.h>
|
||||
#include <codemodelbackendipc/filecontainer.h>
|
||||
#include <codemodelbackendipc/projectpartcontainer.h>
|
||||
#include <clangbackendipc/cmbregisterprojectsforcodecompletioncommand.h>
|
||||
#include <clangbackendipc/filecontainer.h>
|
||||
#include <clangbackendipc/projectpartcontainer.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
@@ -160,7 +160,7 @@ void ModelManagerSupportClang::onAbstractEditorSupportRemoved(const QString &fil
|
||||
if (!cppModelManager()->cppEditorDocument(filePath)) {
|
||||
const QString projectFilePath = Utils::projectFilePathForFile(filePath);
|
||||
m_ipcCommunicator->unregisterFilesForCodeCompletion(
|
||||
{CodeModelBackEnd::FileContainer(filePath, projectFilePath)});
|
||||
{ClangBackEnd::FileContainer(filePath, projectFilePath)});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
namespace ClangCodeModel {
|
||||
namespace Internal {
|
||||
|
||||
void CompletionChunksToTextConverter::parseChunks(const QVector<CodeModelBackEnd::CodeCompletionChunk> &codeCompletionChunks)
|
||||
void CompletionChunksToTextConverter::parseChunks(const QVector<ClangBackEnd::CodeCompletionChunk> &codeCompletionChunks)
|
||||
{
|
||||
m_text.clear();
|
||||
|
||||
@@ -46,7 +46,7 @@ const QString &CompletionChunksToTextConverter::text() const
|
||||
return m_text;
|
||||
}
|
||||
|
||||
QString CompletionChunksToTextConverter::convert(const QVector<CodeModelBackEnd::CodeCompletionChunk> &codeCompletionChunks)
|
||||
QString CompletionChunksToTextConverter::convert(const QVector<ClangBackEnd::CodeCompletionChunk> &codeCompletionChunks)
|
||||
{
|
||||
CompletionChunksToTextConverter converter;
|
||||
|
||||
@@ -55,9 +55,9 @@ QString CompletionChunksToTextConverter::convert(const QVector<CodeModelBackEnd:
|
||||
return converter.text();
|
||||
}
|
||||
|
||||
void CompletionChunksToTextConverter::parse(const CodeModelBackEnd::CodeCompletionChunk &codeCompletionChunk)
|
||||
void CompletionChunksToTextConverter::parse(const ClangBackEnd::CodeCompletionChunk &codeCompletionChunk)
|
||||
{
|
||||
using CodeModelBackEnd::CodeCompletionChunk;
|
||||
using ClangBackEnd::CodeCompletionChunk;
|
||||
|
||||
switch (codeCompletionChunk.kind()) {
|
||||
case CodeCompletionChunk::ResultType: parseResultType(codeCompletionChunk.text()); break;
|
||||
@@ -76,7 +76,7 @@ void CompletionChunksToTextConverter::parseText(const Utf8String &text)
|
||||
m_text += text.toString();
|
||||
}
|
||||
|
||||
void CompletionChunksToTextConverter::parseOptional(const CodeModelBackEnd::CodeCompletionChunk &optionalCodeCompletionChunk)
|
||||
void CompletionChunksToTextConverter::parseOptional(const ClangBackEnd::CodeCompletionChunk &optionalCodeCompletionChunk)
|
||||
{
|
||||
m_text += QStringLiteral("<i>");
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef CLANGCODEMODEL_INTERNAL_COMPLETIONCHUNKSTOTEXTCONVERTER_H
|
||||
#define CLANGCODEMODEL_INTERNAL_COMPLETIONCHUNKSTOTEXTCONVERTER_H
|
||||
|
||||
#include <codemodelbackendipc/codecompletionchunk.h>
|
||||
#include <clangbackendipc/codecompletionchunk.h>
|
||||
|
||||
#include <QString>
|
||||
|
||||
@@ -43,17 +43,17 @@ namespace Internal {
|
||||
class CompletionChunksToTextConverter
|
||||
{
|
||||
public:
|
||||
void parseChunks(const QVector<CodeModelBackEnd::CodeCompletionChunk> &codeCompletionChunks);
|
||||
void parseChunks(const QVector<ClangBackEnd::CodeCompletionChunk> &codeCompletionChunks);
|
||||
|
||||
const QString &text() const;
|
||||
|
||||
static QString convert(const QVector<CodeModelBackEnd::CodeCompletionChunk> &codeCompletionChunks);
|
||||
static QString convert(const QVector<ClangBackEnd::CodeCompletionChunk> &codeCompletionChunks);
|
||||
|
||||
private:
|
||||
void parse(const CodeModelBackEnd::CodeCompletionChunk & codeCompletionChunk);
|
||||
void parse(const ClangBackEnd::CodeCompletionChunk & codeCompletionChunk);
|
||||
void parseResultType(const Utf8String &text);
|
||||
void parseText(const Utf8String &text);
|
||||
void parseOptional(const CodeModelBackEnd::CodeCompletionChunk & optionalCodeCompletionChunk);
|
||||
void parseOptional(const ClangBackEnd::CodeCompletionChunk & optionalCodeCompletionChunk);
|
||||
|
||||
private:
|
||||
QString m_text;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "clangcodecompletion_test.h"
|
||||
|
||||
#include "../codemodelbackendipcintegration.h"
|
||||
#include "../clangbackendipcintegration.h"
|
||||
#include "../clangmodelmanagersupport.h"
|
||||
|
||||
#include <clangcodemodel/clangcompletion.h>
|
||||
@@ -52,19 +52,19 @@
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <codemodelbackendipc/cmbcompletecodecommand.h>
|
||||
#include <codemodelbackendipc/cmbendcommand.h>
|
||||
#include <codemodelbackendipc/cmbregisterprojectsforcodecompletioncommand.h>
|
||||
#include <codemodelbackendipc/cmbregistertranslationunitsforcodecompletioncommand.h>
|
||||
#include <codemodelbackendipc/cmbunregisterprojectsforcodecompletioncommand.h>
|
||||
#include <codemodelbackendipc/cmbunregistertranslationunitsforcodecompletioncommand.h>
|
||||
#include <clangbackendipc/cmbcompletecodecommand.h>
|
||||
#include <clangbackendipc/cmbendcommand.h>
|
||||
#include <clangbackendipc/cmbregisterprojectsforcodecompletioncommand.h>
|
||||
#include <clangbackendipc/cmbregistertranslationunitsforcodecompletioncommand.h>
|
||||
#include <clangbackendipc/cmbunregisterprojectsforcodecompletioncommand.h>
|
||||
#include <clangbackendipc/cmbunregistertranslationunitsforcodecompletioncommand.h>
|
||||
#include <utils/changeset.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QtTest>
|
||||
|
||||
using namespace CodeModelBackEnd;
|
||||
using namespace ClangBackEnd;
|
||||
using namespace ClangCodeModel;
|
||||
using namespace ClangCodeModel::Internal;
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
QTC_LIB_DEPENDS += \
|
||||
sqlite \
|
||||
codemodelbackendipc
|
||||
clangbackendipc
|
||||
|
||||
QT += core network
|
||||
QT -= gui
|
||||
|
||||
TARGET = codemodelbackend
|
||||
TARGET = clangbackend
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle C++-14
|
||||
|
||||
TEMPLATE = app
|
||||
|
||||
include(ipcsource/codemodelbackendclangipc-source.pri)
|
||||
include(ipcsource/clangbackendclangipc-source.pri)
|
||||
include(../../../qtcreator.pri)
|
||||
include(../../shared/clang/clang_installation.pri)
|
||||
include(../../rpath.pri)
|
||||
@@ -19,7 +19,7 @@ include(../../rpath.pri)
|
||||
LIBS += $$LLVM_LIBS
|
||||
INCLUDEPATH += $$LLVM_INCLUDEPATH
|
||||
|
||||
SOURCES += codemodelbackendmain.cpp
|
||||
SOURCES += clangbackendmain.cpp
|
||||
|
||||
osx {
|
||||
QMAKE_LFLAGS += -Wl,-rpath,$${LLVM_LIBDIR}
|
||||
@@ -1,4 +1,4 @@
|
||||
include(codemodelbackend.pri)
|
||||
include(clangbackend.pri)
|
||||
|
||||
DESTDIR = $$IDE_LIBEXEC_PATH
|
||||
target.path = $$QTC_PREFIX/bin # FIXME: libexec, more or less
|
||||
@@ -3,9 +3,9 @@ import QtcClangInstallation as Clang
|
||||
import QtcProcessOutputReader
|
||||
|
||||
QtcTool {
|
||||
name: "codemodelbackend"
|
||||
name: "clangbackend"
|
||||
|
||||
Depends { name: "CodeModelBackEndIpc" }
|
||||
Depends { name: "ClangBackEndIpc" }
|
||||
|
||||
Group {
|
||||
prefix: "ipcsource/"
|
||||
@@ -15,7 +15,7 @@ QtcTool {
|
||||
]
|
||||
}
|
||||
|
||||
files: [ "codemodelbackendmain.cpp" ]
|
||||
files: [ "clangbackendmain.cpp" ]
|
||||
|
||||
property string llvmConfig: Clang.llvmConfig(qbs)
|
||||
property string llvmIncludeDir: Clang.includeDir(llvmConfig, QtcProcessOutputReader)
|
||||
@@ -38,7 +38,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication::setOrganizationName(QStringLiteral("QtProject"));
|
||||
QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org"));
|
||||
QCoreApplication::setApplicationName(QStringLiteral("CodeModelBackend"));
|
||||
QCoreApplication::setApplicationName(QStringLiteral("ClangBackend"));
|
||||
QCoreApplication::setApplicationVersion(QStringLiteral("1.0.0"));
|
||||
|
||||
QCoreApplication application(argc, argv);
|
||||
@@ -48,10 +48,10 @@ int main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
CodeModelBackEnd::Commands::registerCommands();
|
||||
ClangBackEnd::Commands::registerCommands();
|
||||
|
||||
CodeModelBackEnd::ClangIpcServer clangIpcServer;
|
||||
CodeModelBackEnd::ConnectionServer connectionServer(application.arguments()[1]);
|
||||
ClangBackEnd::ClangIpcServer clangIpcServer;
|
||||
ClangBackEnd::ConnectionServer connectionServer(application.arguments()[1]);
|
||||
connectionServer.start();
|
||||
connectionServer.setIpcServer(&clangIpcServer);
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
using std::swap;
|
||||
|
||||
@@ -68,5 +68,5 @@ ClangCodeCompleteResults::ClangCodeCompleteResults(ClangCodeCompleteResults &&cl
|
||||
swap(cxCodeCompleteResults, clangCodeCompleteResults.cxCodeCompleteResults);
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,15 +28,15 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_CLANGCODECOMPLETERESULTS_H
|
||||
#define CODEMODELBACKEND_CLANGCODECOMPLETERESULTS_H
|
||||
#ifndef CLANGBACKEND_CLANGCODECOMPLETERESULTS_H
|
||||
#define CLANGBACKEND_CLANGCODECOMPLETERESULTS_H
|
||||
|
||||
|
||||
#include <clang-c/Index.h>
|
||||
|
||||
#include <utf8string.h>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class ClangCodeCompleteResults
|
||||
{
|
||||
@@ -58,6 +58,6 @@ private:
|
||||
CXCodeCompleteResults *cxCodeCompleteResults = nullptr;
|
||||
};
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
#endif // CODEMODELBACKEND_CLANGCODECOMPLETERESULTS_H
|
||||
#endif // CLANGBACKEND_CLANGCODECOMPLETERESULTS_H
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
ClangIpcServer::ClangIpcServer()
|
||||
: translationUnits(projects, unsavedFiles)
|
||||
@@ -63,7 +63,7 @@ void ClangIpcServer::end()
|
||||
QCoreApplication::exit();
|
||||
}
|
||||
|
||||
void ClangIpcServer::registerTranslationUnitsForCodeCompletion(const CodeModelBackEnd::RegisterTranslationUnitForCodeCompletionCommand &command)
|
||||
void ClangIpcServer::registerTranslationUnitsForCodeCompletion(const ClangBackEnd::RegisterTranslationUnitForCodeCompletionCommand &command)
|
||||
{
|
||||
try {
|
||||
translationUnits.createOrUpdate(command.fileContainers());
|
||||
@@ -75,7 +75,7 @@ void ClangIpcServer::registerTranslationUnitsForCodeCompletion(const CodeModelBa
|
||||
}
|
||||
}
|
||||
|
||||
void ClangIpcServer::unregisterTranslationUnitsForCodeCompletion(const CodeModelBackEnd::UnregisterTranslationUnitsForCodeCompletionCommand &command)
|
||||
void ClangIpcServer::unregisterTranslationUnitsForCodeCompletion(const ClangBackEnd::UnregisterTranslationUnitsForCodeCompletionCommand &command)
|
||||
{
|
||||
try {
|
||||
translationUnits.remove(command.fileContainers());
|
||||
@@ -108,7 +108,7 @@ void ClangIpcServer::unregisterProjectPartsForCodeCompletion(const UnregisterPro
|
||||
}
|
||||
}
|
||||
|
||||
void ClangIpcServer::completeCode(const CodeModelBackEnd::CompleteCodeCommand &command)
|
||||
void ClangIpcServer::completeCode(const ClangBackEnd::CompleteCodeCommand &command)
|
||||
{
|
||||
try {
|
||||
CodeCompleter codeCompleter(translationUnits.translationUnit(command.filePath(), command.projectPartId()));
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
#include <QMap>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class ClangIpcServer : public IpcServerInterface
|
||||
{
|
||||
@@ -63,5 +63,5 @@ private:
|
||||
TranslationUnits translationUnits;
|
||||
};
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
#endif // CLANGIPCSERVER_H
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
ClangString::ClangString(CXString cxString)
|
||||
: cxString(cxString)
|
||||
@@ -70,5 +70,5 @@ ClangString::operator Utf8String() const
|
||||
return Utf8String(clang_getCString(cxString), -1);
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_CLANGSTRING_H
|
||||
#define CODEMODELBACKEND_CLANGSTRING_H
|
||||
#ifndef CLANGBACKEND_CLANGSTRING_H
|
||||
#define CLANGBACKEND_CLANGSTRING_H
|
||||
|
||||
#include <clang-c/CXString.h>
|
||||
|
||||
#include <utf8string.h>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class ClangString
|
||||
{
|
||||
@@ -57,6 +57,6 @@ private:
|
||||
CXString cxString;
|
||||
};
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
#endif // CODEMODELBACKEND_CLANGSTRING_H
|
||||
#endif // CLANGBACKEND_CLANGSTRING_H
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
CodeCompleter::CodeCompleter(TranslationUnit translationUnit)
|
||||
: translationUnit(std::move(translationUnit))
|
||||
@@ -74,5 +74,5 @@ void CodeCompleter::checkCodeCompleteResult(CXCodeCompleteResults *completeResul
|
||||
throw CodeCompleteFailedException();
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,15 +28,15 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_CODECOMPLETER_H
|
||||
#define CODEMODELBACKEND_CODECOMPLETER_H
|
||||
#ifndef CLANGBACKEND_CODECOMPLETER_H
|
||||
#define CLANGBACKEND_CODECOMPLETER_H
|
||||
|
||||
#include <codecompletion.h>
|
||||
#include <utf8stringvector.h>
|
||||
|
||||
#include "translationunit.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class TranslationUnit;
|
||||
|
||||
@@ -56,6 +56,6 @@ private:
|
||||
TranslationUnit translationUnit;
|
||||
};
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
#endif // CODEMODELBACKEND_CODECOMPLETER_H
|
||||
#endif // CLANGBACKEND_CODECOMPLETER_H
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "clangstring.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
void CodeCompletionChunkConverter::extractCompletionChunks(CXCompletionString completionString)
|
||||
{
|
||||
@@ -93,5 +93,5 @@ QVector<CodeCompletionChunk> CodeCompletionChunkConverter::optionalChunks(CXComp
|
||||
return converter.chunks;
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_CODECOMPLETIONCHUNKCONVERTER_H
|
||||
#define CODEMODELBACKEND_CODECOMPLETIONCHUNKCONVERTER_H
|
||||
#ifndef CLANGBACKEND_CODECOMPLETIONCHUNKCONVERTER_H
|
||||
#define CLANGBACKEND_CODECOMPLETIONCHUNKCONVERTER_H
|
||||
|
||||
#include <codecompletionchunk.h>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include <clang-c/Index.h>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CodeCompletionChunkConverter
|
||||
{
|
||||
@@ -56,6 +56,6 @@ private:
|
||||
QVector<CodeCompletionChunk> chunks;
|
||||
};
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
#endif // CODEMODELBACKEND_CODECOMPLETIONCHUNKCONVERTER_H
|
||||
#endif // CLANGBACKEND_CODECOMPLETIONCHUNKCONVERTER_H
|
||||
@@ -33,13 +33,13 @@
|
||||
#include "clangstring.h"
|
||||
#include "codecompletionchunkconverter.h"
|
||||
|
||||
#ifdef CODEMODELBACKEND_TESTS
|
||||
#ifdef CLANGBACKEND_TESTS
|
||||
#include <gtest/gtest.h>
|
||||
#endif
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
CodeCompletionsExtractor::CodeCompletionsExtractor(CXCodeCompleteResults *cxCodeCompleteResults)
|
||||
: cxCodeCompleteResults(cxCodeCompleteResults)
|
||||
@@ -271,7 +271,7 @@ const CodeCompletion &CodeCompletionsExtractor::currentCodeCompletion() const
|
||||
return currentCodeCompletion_;
|
||||
}
|
||||
|
||||
#ifdef CODEMODELBACKEND_TESTS
|
||||
#ifdef CLANGBACKEND_TESTS
|
||||
void PrintTo(const CodeCompletionsExtractor &extractor, std::ostream *os)
|
||||
{
|
||||
*os << "name: " << ::testing::PrintToString(extractor.currentCodeCompletion().text())
|
||||
@@ -281,5 +281,5 @@ void PrintTo(const CodeCompletionsExtractor &extractor, std::ostream *os)
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_CODECOMPLETIONSEXTRACTOR_H
|
||||
#define CODEMODELBACKEND_CODECOMPLETIONSEXTRACTOR_H
|
||||
#ifndef CLANGBACKEND_CODECOMPLETIONSEXTRACTOR_H
|
||||
#define CLANGBACKEND_CODECOMPLETIONSEXTRACTOR_H
|
||||
|
||||
#include <clang-c/Index.h>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include <codecompletion.h>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CodeCompletionsExtractor
|
||||
{
|
||||
@@ -76,9 +76,9 @@ private:
|
||||
uint cxCodeCompleteResultIndex = -1;
|
||||
};
|
||||
|
||||
#ifdef CODEMODELBACKEND_TESTS
|
||||
#ifdef CLANGBACKEND_TESTS
|
||||
void PrintTo(const CodeCompletionsExtractor &extractor, ::std::ostream* os);
|
||||
#endif
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
#endif // CODEMODELBACKEND_CODECOMPLETIONSEXTRACTOR_H
|
||||
#endif // CLANGBACKEND_CODECOMPLETIONSEXTRACTOR_H
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include <projectpartcontainer.h>
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class ProjectPartData {
|
||||
public:
|
||||
@@ -154,5 +154,5 @@ bool operator==(const ProjectPart &first, const ProjectPart &second)
|
||||
return first.projectPartId() == second.projectPartId();
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODEMODELBACKEND_PROJECT_H
|
||||
#define CODEMODELBACKEND_PROJECT_H
|
||||
#ifndef CLANGBACKEND_PROJECT_H
|
||||
#define CLANGBACKEND_PROJECT_H
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
@@ -38,7 +38,7 @@
|
||||
class Utf8String;
|
||||
class Utf8StringVector;
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class ProjectPartContainer;
|
||||
class ProjectPartData;
|
||||
@@ -80,6 +80,6 @@ private:
|
||||
|
||||
bool operator==(const ProjectPart &first, const ProjectPart &second);
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
#endif // CODEMODELBACKEND_PROJECT_H
|
||||
#endif // CLANGBACKEND_PROJECT_H
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "projectpartsdonotexistexception.h"
|
||||
|
||||
namespace CodeModelBackEnd {
|
||||
namespace ClangBackEnd {
|
||||
|
||||
ProjectPartDoNotExistException::ProjectPartDoNotExistException(const Utf8StringVector &projectPartIds)
|
||||
: projectPartIds_(projectPartIds)
|
||||
@@ -52,5 +52,5 @@ const char *ProjectPartDoNotExistException::what() const Q_DECL_NOEXCEPT
|
||||
return what_.constData();
|
||||
}
|
||||
|
||||
} // namespace CodeModelBackEnd
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user