-
Notifications
You must be signed in to change notification settings - Fork 0
/
rubylanguagesupport.h
84 lines (67 loc) · 2.68 KB
/
rubylanguagesupport.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
* This file is part of KDevelop
*
* Copyright 2006-2010 Alexander Dymo <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef KDEVRUBYLANGUAGESUPPORT_H
#define KDEVRUBYLANGUAGESUPPORT_H
#include <interfaces/iplugin.h>
#include <language/interfaces/ilanguagesupport.h>
class KConfigGroup;
namespace KDevelop {
class IDocument;
class IProject;
class ILaunchConfiguration;
}
namespace Ruby {
class RailsSwitchers;
class RailsDataProvider;
}
class RubyLanguageSupport : public KDevelop::IPlugin, public KDevelop::ILanguageSupport
{
Q_OBJECT
Q_INTERFACES( KDevelop::ILanguageSupport )
public:
RubyLanguageSupport( QObject *parent, const QVariantList& args = QVariantList() );
virtual ~RubyLanguageSupport();
static RubyLanguageSupport* self();
virtual KDevelop::ParseJob* createParseJob(const KDevelop::IndexedString&);
virtual QString name() const;
QStringList extensions() const;
private Q_SLOTS:
void documentLoaded(KDevelop::IDocument *document);
void documentClosed(KDevelop::IDocument *document);
void projectOpened(KDevelop::IProject *project);
void projectClosing(KDevelop::IProject *project);
void documentChanged( KDevelop::IDocument* document );
void documentActivated( KDevelop::IDocument* document );
void runCurrentFile();
void runCurrentTestFunction();
private:
KDevelop::ILaunchConfiguration *findOrCreateLaunchConfiguration(const QString &name);
void setUpLaunchConfigurationBeforeRun(KConfigGroup &cfg, KDevelop::IDocument *activeDocument);
QString findFunctionUnderCursor(KDevelop::IDocument *doc);
static RubyLanguageSupport* m_self;
Ruby::RailsSwitchers *m_railsSwitchers;
Ruby::RailsDataProvider *m_viewsQuickOpenDataProvider;
Ruby::RailsDataProvider *m_testsQuickOpenDataProvider;
KDevelop::ILaunchConfiguration *m_rubyFileLaunchConfiguration;
KDevelop::ILaunchConfiguration *m_rubyCurrentFunctionLaunchConfiguration;
};
#endif
// kate: space-indent on; indent-width 4; tab-width 4; replace-tabs on