2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2012-03-02 16:26:22 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2012-03-02 16:26:22 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2012-03-02 16:26:22 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** 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
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2012-03-02 16:26:22 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2012-03-02 16:26:22 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2012-03-02 16:26:22 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2012-02-21 10:00:32 +01:00
|
|
|
|
|
|
|
|
#include "cpptools_global.h"
|
|
|
|
|
|
2013-08-30 13:13:44 +02:00
|
|
|
#include <texteditor/codeassist/assistenums.h>
|
2012-02-21 10:00:32 +01:00
|
|
|
#include <texteditor/codeassist/completionassistprovider.h>
|
|
|
|
|
|
2013-08-30 13:13:44 +02:00
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QTextDocument;
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
2015-03-05 08:22:48 +01:00
|
|
|
namespace CPlusPlus { struct LanguageFeatures; }
|
|
|
|
|
|
2013-08-30 13:13:44 +02:00
|
|
|
namespace TextEditor {
|
2015-05-08 15:48:17 +02:00
|
|
|
class TextEditorWidget;
|
2014-09-04 00:04:18 +02:00
|
|
|
class AssistInterface;
|
2013-08-30 13:13:44 +02:00
|
|
|
}
|
|
|
|
|
|
2012-02-21 10:00:32 +01:00
|
|
|
namespace CppTools {
|
|
|
|
|
|
|
|
|
|
class CPPTOOLS_EXPORT CppCompletionAssistProvider : public TextEditor::CompletionAssistProvider
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2015-06-03 15:32:42 +02:00
|
|
|
bool supportsEditor(Core::Id editorId) const override;
|
|
|
|
|
int activationCharSequenceLength() const override;
|
|
|
|
|
bool isActivationCharSequence(const QString &sequence) const override;
|
|
|
|
|
bool isContinuationChar(const QChar &c) const override;
|
2012-02-21 10:00:32 +01:00
|
|
|
|
2014-09-04 00:04:18 +02:00
|
|
|
virtual TextEditor::AssistInterface *createAssistInterface(
|
2014-09-03 21:58:57 +02:00
|
|
|
const QString &filePath,
|
2015-05-08 15:48:17 +02:00
|
|
|
const TextEditor::TextEditorWidget *textEditorWidget,
|
2015-02-26 08:42:05 +02:00
|
|
|
const CPlusPlus::LanguageFeatures &languageFeatures,
|
|
|
|
|
int position,
|
2014-05-14 11:34:45 -04:00
|
|
|
TextEditor::AssistReason reason) const = 0;
|
2012-02-21 10:00:32 +01:00
|
|
|
|
|
|
|
|
static int activationSequenceChar(const QChar &ch, const QChar &ch2,
|
|
|
|
|
const QChar &ch3, unsigned *kind,
|
2015-02-16 11:49:07 +01:00
|
|
|
bool wantFunctionCall, bool wantQt5SignalSlots);
|
2012-02-21 10:00:32 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace CppTools
|