File indexing completed on 2024-05-05 16:46:47
0001 /* 0002 SPDX-FileCopyrightText: 2012 Aleix Pol <aleixpol@kde.org> 0003 SPDX-FileCopyrightText: 2012 Milian Wolff <mail@milianw.de> 0004 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #ifndef KDEVQMLJSPLUGIN_H 0009 #define KDEVQMLJSPLUGIN_H 0010 0011 #include <interfaces/iplugin.h> 0012 #include <language/interfaces/ilanguagesupport.h> 0013 0014 class ModelManager; 0015 0016 class KDevQmlJsPlugin : public KDevelop::IPlugin, public KDevelop::ILanguageSupport 0017 { 0018 Q_OBJECT 0019 Q_INTERFACES( KDevelop::ILanguageSupport ) 0020 public: 0021 explicit KDevQmlJsPlugin( QObject* parent, const QVariantList& args = QVariantList() ); 0022 ~KDevQmlJsPlugin() override; 0023 0024 KDevelop::ParseJob* createParseJob(const KDevelop::IndexedString& url) override; 0025 QString name() const override; 0026 0027 KDevelop::ICodeHighlighting* codeHighlighting() const override; 0028 KDevelop::BasicRefactoring* refactoring() const override; 0029 0030 KDevelop::ContextMenuExtension contextMenuExtension(KDevelop::Context* context, QWidget* parent) override; 0031 QPair<QWidget*, KTextEditor::Range> specialLanguageObjectNavigationWidget(const QUrl& url, const KTextEditor::Cursor& position) override; 0032 0033 private: 0034 KDevelop::ICodeHighlighting* m_highlighting; 0035 KDevelop::BasicRefactoring* m_refactoring; 0036 0037 ModelManager* m_modelManager; 0038 }; 0039 0040 #endif // KDEVQMLJSPLUGIN_H