1 /* 2 SPDX-FileCopyrightText: 2010 Olivier de Gaalon <olivier.jg@gmail.com> 3 SPDX-FileCopyrightText: 2014 Kevin Funk <kfunk@kde.org> 4 5 SPDX-License-Identifier: LGPL-2.0-only 6 */ 7 8 #ifndef KDEVPLATFORM_RENAMEASSISTANT_H 9 #define KDEVPLATFORM_RENAMEASSISTANT_H 10 11 #include <language/assistant/staticassistant.h> 12 #include <language/duchain/identifier.h> 13 #include "renameaction.h" 14 15 namespace KTextEditor { 16 class View; 17 } 18 19 namespace KDevelop { 20 class RenameAssistantPrivate; 21 22 class KDEVPLATFORMLANGUAGE_EXPORT RenameAssistant 23 : public StaticAssistant 24 { 25 Q_OBJECT 26 27 public: 28 explicit RenameAssistant(ILanguageSupport* supportedLanguage); 29 ~RenameAssistant() override; 30 31 void textChanged(KTextEditor::Document* doc, const KTextEditor::Range& invocationRange, 32 const QString& removedText = QString()) override; 33 bool isUseful() const override; 34 KTextEditor::Range displayRange() const override; 35 36 QString title() const override; 37 38 private: 39 const QScopedPointer<class RenameAssistantPrivate> d_ptr; 40 Q_DECLARE_PRIVATE(RenameAssistant) 41 }; 42 } 43 44 #endif // KDEVPLATFORM_RENAMEASSISTANT_H 45