Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmlcompletionsupport_p.h
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QQMLCOMPLETIONSUPPORT_P_H
6#define QQMLCOMPLETIONSUPPORT_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qlanguageserver_p.h>
20#include <private/qqmlbasemodule_p.h>
21
22#include <QtCore/qmutex.h>
23#include <QtCore/qhash.h>
24#include <QtQmlLS/private/qqmllscompletion_p.h>
25
26QT_BEGIN_NAMESPACE
27struct CompletionRequest : BaseRequest<QLspSpecification::CompletionParams,
28 QLspSpecification::Responses::CompletionResponseType>
29{
30 QString code;
31
32 bool fillFrom(QmlLsp::OpenDocument doc, const Parameters &params, Response &&response);
33 void sendCompletions(const QList<QLspSpecification::CompletionItem> &completions);
34 QString urlAndPos() const;
35 QList<QLspSpecification::CompletionItem>
36 completions(QmlLsp::QQmlCodeModelManager *codeModelManager,
37 const QQmlLSCompletion &completionEngine) const;
38 QQmlJS::Dom::DomItem
39 patchInvalidFileForParser(const QQmlJS::Dom::DomItem &file, qsizetype position,
40 QmlLsp::QQmlCodeModelManager *codeModelManager) const;
41};
42
44{
46public:
48 void registerHandlers(QLanguageServer *server, QLanguageServerProtocol *protocol) override;
49 void setupCapabilities(QLspSpecification::ServerCapabilities &caps) override;
50 void process(RequestPointerArgument req) override;
51
53};
54QT_END_NAMESPACE
55
56#endif // QMLCOMPLETIONSUPPORT_P_H
void registerHandlers(QLanguageServer *server, QLanguageServerProtocol *protocol) override
QQmlLSCompletion m_completionEngine
void setupCapabilities(QLspSpecification::ServerCapabilities &caps) override
void process(RequestPointerArgument req) override
Combined button and popup list for selecting options.
static bool positionIsFollowedBySpaces(qsizetype position, const QString &code)