-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextension.js
65 lines (53 loc) · 2.17 KB
/
extension.js
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
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
const vscode = require('vscode');
let { update, rename, add, revert, diff, commit, log } = require('./lib/rabbitvcs-svn.js');
function activate (context) {
console.log('rabbitvcs插件激活');
let commitCmd = vscode.commands.registerCommand('extension.commit', function (params) {
commit(params.path);
// vscode.window.showInformationMessage('更新svn代码');
});
let updateCmd = vscode.commands.registerCommand('extension.update', function (params) {
update(params.path);
// vscode.window.showInformationMessage('更新svn代码');
});
let renameCmd = vscode.commands.registerCommand('extension.rename', function (params) {
rename(params.path);
// vscode.window.showInformationMessage('更新svn代码');
});
let addCmd = vscode.commands.registerCommand('extension.add', function (params) {
add(params.path);
// vscode.window.showInformationMessage('更新svn代码');
});
let revertCmd = vscode.commands.registerCommand('extension.revert', function (params) {
revert(params.path);
// vscode.window.showInformationMessage('更新svn代码');
});
let diffCmd = vscode.commands.registerCommand('extension.diff', function (params) {
diff(params.path);
// vscode.window.showInformationMessage('更新svn代码');
});
let logCmd = vscode.commands.registerCommand('extension.log', function (params) {
log(params.path);
// vscode.window.showInformationMessage('更新svn代码');
});
/* ,{
"command": "extension.diff",
"group": "9_cutcopypaste"
},{
"command": "extension.revert",
"group": "9_cutcopypaste"
},{
"command": "extension.add",
"group": "9_cutcopypaste"
},{
"command": "extension.rename",
"group": "9_cutcopypaste"
} */
context.subscriptions.push(commitCmd, updateCmd, renameCmd, addCmd, revertCmd, diffCmd, logCmd);
}
exports.activate = activate;
function deactivate () {
}
exports.deactivate = deactivate;