2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 Jan Dalheimer <jan@dalheimer.de>
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2015-08-24 08:43:18 +02:00
|
|
|
|
2016-01-27 10:14:00 +01:00
|
|
|
#pragma once
|
2015-08-24 08:43:18 +02:00
|
|
|
|
|
|
|
|
#include "cmake_global.h"
|
|
|
|
|
|
|
|
|
|
#include <texteditor/autocompleter.h>
|
|
|
|
|
|
2022-09-29 15:26:31 +02:00
|
|
|
namespace CMakeProjectManager::Internal {
|
2015-08-24 08:43:18 +02:00
|
|
|
|
|
|
|
|
class CMAKE_EXPORT CMakeAutoCompleter : public TextEditor::AutoCompleter
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CMakeAutoCompleter();
|
|
|
|
|
|
|
|
|
|
bool isInComment(const QTextCursor &cursor) const override;
|
|
|
|
|
bool isInString(const QTextCursor &cursor) const override;
|
2016-04-14 09:00:05 +02:00
|
|
|
QString insertMatchingBrace(const QTextCursor &cursor, const QString &text,
|
2016-06-10 15:13:38 +02:00
|
|
|
QChar lookAhead, bool skipChars, int *skippedChars) const override;
|
2016-04-14 09:00:05 +02:00
|
|
|
QString insertMatchingQuote(const QTextCursor &cursor, const QString &text,
|
2016-06-10 15:13:38 +02:00
|
|
|
QChar lookAhead, bool skipChars, int *skippedChars) const override;
|
2017-07-17 12:41:37 +02:00
|
|
|
int paragraphSeparatorAboutToBeInserted(QTextCursor &cursor) override;
|
2016-04-14 09:00:05 +02:00
|
|
|
bool contextAllowsAutoBrackets(const QTextCursor &cursor, const QString &textToInsert) const override;
|
|
|
|
|
bool contextAllowsAutoQuotes(const QTextCursor &cursor, const QString &textToInsert) const override;
|
2015-08-24 08:43:18 +02:00
|
|
|
bool contextAllowsElectricCharacters(const QTextCursor &cursor) const override;
|
|
|
|
|
};
|
|
|
|
|
|
2022-09-29 15:26:31 +02:00
|
|
|
} // CMakeProjectManager::Internal
|