-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtfsplugin.h
116 lines (88 loc) · 2.84 KB
/
tfsplugin.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
115
116
#ifndef TFS_H
#define TFS_H
#include "tfs_global.h"
#include "tfssettings.h"
#include "tfsclient.h"
#include "optionspage.h"
#include <vcsbase/vcsbaseclient.h>
#include <vcsbase/vcsbaseplugin.h>
#include <coreplugin/icontext.h>
#include <coreplugin/locator/commandlocator.h>
QT_BEGIN_NAMESPACE
class QAction;
QT_END_NAMESPACE
namespace Core {
class ActionContainer;
class ActionManager;
class ICore;
class Id;
class IEditor;
} // namespace Core
namespace Utils { class ParameterAction; }
namespace Locator { class CommandLocator; }
namespace Tfs {
namespace Internal {
class TfsPlugin : public VcsBase::VcsBasePlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "Tfs.json")
public:
TfsPlugin();
~TfsPlugin();
bool initialize(const QStringList &arguments, QString *errorString);
void extensionsInitialized();
ShutdownFlag aboutToShutdown();
static TfsPlugin *instance() { return m_instance; }
TfsClient *client() const { return m_client; }
static const TfsSettings &settings();
void setSettings(const TfsSettings &settings);
private slots:
// // File menu action slots
// void addCurrentFile();
// void annotateCurrentFile();
// void diffCurrentFile();
// void logCurrentFile();
// void revertCurrentFile();
// void statusCurrentFile();
// // Directory menu action slots
// void diffRepository();
// void logRepository();
// void revertMulti();
// void statusMulti();
// Repository menu action slots
void workspaces();
// void pull();
// void push();
// void update();
// void import();
// void incoming();
// void outgoing();
// void commit();
// void showCommitWidget(const QList<VcsBase::VcsBaseClient::StatusItem> &status);
// void commitFromEditor();
// void diffFromEditorSelected(const QStringList &files);
protected:
void updateActions(VcsBase::VcsBasePlugin::ActionState);
bool submitEditorAboutToClose();
private:
void createMenu();
void createSubmitEditorActions();
void createFileActions(const Core::Context &context);
void createDirectoryActions(const Core::Context &context);
void createRepositoryActions(const Core::Context &context);
void createRepositoryManagementActions(const Core::Context &context);
void createLessUsedActions(const Core::Context &context);
static TfsPlugin *m_instance;
TfsSettings tfsSettings;
OptionsPage *optionsPage;
TfsClient *m_client;
Core::ICore *core;
Core::CommandLocator *m_commandLocator;
Core::ActionContainer *tfsContainer;
QList<QAction *> m_repositoryActionList;
Utils::ParameterAction *workspaceEdit;
QAction *m_menuAction;
};
} // namespace Internal
} // namespace tfs
#endif // TFS_H