File indexing completed on 2024-05-12 04:37:41
0001 /* 0002 SPDX-FileCopyrightText: 2010 Olivier de Gaalon <olivier.jg@gmail.com> 0003 SPDX-FileCopyrightText: 2014 Kevin Funk <kfunk@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.0-only 0006 */ 0007 0008 #ifndef KDEVPLATFORM_RENAMEASSISTANT_H 0009 #define KDEVPLATFORM_RENAMEASSISTANT_H 0010 0011 #include <language/assistant/staticassistant.h> 0012 #include <language/duchain/identifier.h> 0013 #include "renameaction.h" 0014 0015 namespace KTextEditor { 0016 class View; 0017 } 0018 0019 namespace KDevelop { 0020 class RenameAssistantPrivate; 0021 0022 class KDEVPLATFORMLANGUAGE_EXPORT RenameAssistant 0023 : public StaticAssistant 0024 { 0025 Q_OBJECT 0026 0027 public: 0028 explicit RenameAssistant(ILanguageSupport* supportedLanguage); 0029 ~RenameAssistant() override; 0030 0031 void textChanged(KTextEditor::Document* doc, const KTextEditor::Range& invocationRange, 0032 const QString& removedText = QString()) override; 0033 bool isUseful() const override; 0034 KTextEditor::Range displayRange() const override; 0035 0036 QString title() const override; 0037 0038 private: 0039 const QScopedPointer<class RenameAssistantPrivate> d_ptr; 0040 Q_DECLARE_PRIVATE(RenameAssistant) 0041 }; 0042 } 0043 0044 #endif // KDEVPLATFORM_RENAMEASSISTANT_H