-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathteamfoundationplugin.h
114 lines (97 loc) · 3.66 KB
/
teamfoundationplugin.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/****************************************************************************
**
** Team Foundation Server plugin for Qt Creator
** Copyright (C) 2014 Jesper Hellesø Hansen
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This library 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
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**
****************************************************************************/
#ifndef TEAMFOUNDATION_H
#define TEAMFOUNDATION_H
#include "teamfoundation_global.h"
#include "teamfoundationsettings.h"
#include <vcsbase/vcsbaseplugin.h>
#include <coreplugin/icontext.h>
QT_BEGIN_NAMESPACE
class QAction;
QT_END_NAMESPACE
namespace Core {
class CommandLocator;
class ActionManager;
class ActionContainer;
class Id;
class Command;
}
namespace Utils {
class ParameterAction;
}
namespace TeamFoundation {
namespace Internal {
class TeamFoundationClient;
class TeamFoundationControl;
class TeamFoundationPlugin : public VcsBase::VcsBasePlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "TeamFoundation.json")
public:
TeamFoundationPlugin();
~TeamFoundationPlugin();
bool initialize(const QStringList &arguments, QString *errorString);
TeamFoundationSettings settings() const;
void setSettings(const TeamFoundationSettings &s);
const TeamFoundationClient *client() const;
static TeamFoundationPlugin *instance();
/// emit changed signal in VersionControl - for files emits emitFilesChanged, for directories emits
/// emitRepositoryChanged, and for the empty string, emits emitConfigurationChanged.
void emitChangedSignal(const QString &path) const;
private slots:
#ifdef WITH_TESTS
void testGetRepositoryUrl_data();
void testGetRepositoryUrl();
#endif
protected:
void createMenus(const Core::Context &context);
QAction *createFileAction(
Core::CommandLocator* locator,
const Core::Context &context,
Core::ActionContainer* container,
const QString &emptyText,
const QString ¶meterText,
const char *actionId);
QAction *createProjectAction(
Core::CommandLocator* locator,
Core::ActionContainer* container,
Core::Context context,
const QString &actionText,
const char *actionId);
QAction *createGlobalAction(
Core::CommandLocator* locator,
Core::ActionContainer* container,
const QString &actionText,
const char *actionId);
void updateActions(VcsBase::VcsBasePlugin::ActionState);
bool submitEditorAboutToClose();
void commitFromEditor() override;
private:
TeamFoundationSettings m_settings;
QAction *m_menuAction;
QList<Utils::ParameterAction*> m_fileActions;
QList<QAction*> m_projectActions;
TeamFoundationClient *m_teamFoundationClient;
static TeamFoundationPlugin *m_teamFoundationPluginInstance;
};
} // namespace Internal
} // namespace TeamFoundation
#endif // TEAMFOUNDATION_H