File indexing completed on 2024-05-19 15:41:37
0001 /* 0002 SPDX-FileCopyrightText: 2013 Sven Brauch <svenbrauch@googlemail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef PYTHON_MISSINGINCLUDEITEM_H 0008 #define PYTHON_MISSINGINCLUDEITEM_H 0009 0010 #include "navigation/navigationwidget.h" 0011 #include <language/codecompletion/codecompletionitem.h> 0012 0013 namespace Python { 0014 0015 /// Class for adding an import. Will figure out where to add it by itself. 0016 class MissingIncludeItem : public KDevelop::CompletionTreeItem { 0017 public: 0018 MissingIncludeItem(const QString& insertText, const QString& matchText, const QString& removeComponents=QString()); 0019 void execute(KTextEditor::View* view, const KTextEditor::Range& word) override; 0020 QVariant data(const QModelIndex& index, int role, const KDevelop::CodeCompletionModel* model) const override; 0021 0022 private: 0023 const QString m_text; 0024 const QString m_matchText; 0025 const QString m_removeComponents; 0026 }; 0027 0028 } 0029 0030 #endif // MISSINGINCLUDEITEM_H