File indexing completed on 2021-12-21 13:14:16

0001 /*
0002    Copyright (C) 2009 Niko Sams <niko.sams@gmail.com>
0003 
0004    This library is free software; you can redistribute it and/or
0005    modify it under the terms of the GNU Library General Public
0006    License version 2 as published by the Free Software Foundation.
0007 
0008    This library is distributed in the hope that it will be useful,
0009    but WITHOUT ANY WARRANTY; without even the implied warranty of
0010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0011    Library General Public License for more details.
0012 
0013    You should have received a copy of the GNU Library General Public License
0014    along with this library; see the file COPYING.LIB.  If not, write to
0015    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0016    Boston, MA 02110-1301, USA.
0017 */
0018 
0019 #ifndef KDEVCSSLANGUAGESUPPORT_H
0020 #define KDEVCSSLANGUAGESUPPORT_H
0021 
0022 #include <interfaces/iplugin.h>
0023 #include <language/interfaces/ilanguagesupport.h>
0024 
0025 namespace KDevelop
0026 {
0027 class ParseJob;
0028 }
0029 
0030 namespace Css
0031 {
0032 class LanguageSupport : public KDevelop::IPlugin, public KDevelop::ILanguageSupport
0033 {
0034     Q_OBJECT
0035     Q_INTERFACES(KDevelop::ILanguageSupport)
0036 
0037 public:
0038     explicit LanguageSupport(QObject *parent, const QVariantList& args = QVariantList());
0039 
0040     /*Name Of the Language*/
0041     QString name() const override;
0042 
0043     KDevelop::ParseJob *createParseJob(const KDevelop::IndexedString& url) override;
0044 
0045     static LanguageSupport* self();
0046 
0047     KTextEditor::Range specialLanguageObjectRange(const QUrl& url, const KTextEditor::Cursor& position) override;
0048     QPair<QWidget*, KTextEditor::Range> specialLanguageObjectNavigationWidget(const QUrl& url, const KTextEditor::Cursor& position) override;
0049 
0050 private:
0051     static LanguageSupport* m_self;
0052 };
0053 
0054 }
0055 
0056 #endif
0057