2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2014-01-15 16:58:52 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2014-01-15 16:58:52 +01:00
|
|
|
|
2019-01-16 09:37:54 +01:00
|
|
|
#include <texteditor/textindenter.h>
|
2014-01-15 16:58:52 +01:00
|
|
|
|
|
|
|
|
namespace Android {
|
|
|
|
|
namespace Internal {
|
2019-01-16 09:37:54 +01:00
|
|
|
class JavaIndenter : public TextEditor::TextIndenter
|
2014-01-15 16:58:52 +01:00
|
|
|
{
|
|
|
|
|
public:
|
2019-01-16 09:37:54 +01:00
|
|
|
explicit JavaIndenter(QTextDocument *doc);
|
2016-01-13 14:32:23 +01:00
|
|
|
~JavaIndenter() override;
|
2014-01-15 16:58:52 +01:00
|
|
|
|
2016-01-13 14:32:23 +01:00
|
|
|
bool isElectricCharacter(const QChar &ch) const override;
|
2014-01-15 16:58:52 +01:00
|
|
|
|
2019-01-16 09:37:54 +01:00
|
|
|
void indentBlock(const QTextBlock &block,
|
2016-01-13 14:32:23 +01:00
|
|
|
const QChar &typedChar,
|
2019-01-28 08:11:20 +01:00
|
|
|
const TextEditor::TabSettings &tabSettings,
|
|
|
|
|
int cursorPositionInEditor = -1) override;
|
2016-01-13 14:32:23 +01:00
|
|
|
|
2019-01-28 08:11:20 +01:00
|
|
|
int indentFor(const QTextBlock &block,
|
|
|
|
|
const TextEditor::TabSettings &tabSettings,
|
|
|
|
|
int cursorPositionInEditor = -1) override;
|
2014-01-15 16:58:52 +01:00
|
|
|
};
|
2016-01-13 14:32:23 +01:00
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Android
|