提交 3ac3b7a1 编写于 作者: J Joao Moreno

git context actions

上级 57fe12fe
......@@ -29,6 +29,11 @@
"light": "resources/icons/light/refresh.svg",
"dark": "resources/icons/dark/refresh.svg"
}
},
{
"command": "git.open-change",
"title": "Open Change",
"category": "Git"
}
],
"menus": {
......@@ -38,6 +43,13 @@
"group": "navigation",
"when": "scm.provider == git"
}
],
"scm/context": [
{
"command": "git.open-change",
"group": "navigation",
"when": "scm.provider == git"
}
]
},
"languages": [
......
......@@ -7,6 +7,19 @@
import { commands, Disposable } from 'vscode';
function refresh(): void {
console.log('refresh');
}
function openChange(...args: any[]): void {
console.log('openChange', args);
}
export function registerCommands(): Disposable {
return commands.registerCommand('git.refresh', () => console.log('REFRESH'));
const disposables = [
commands.registerCommand('git.refresh', refresh),
commands.registerCommand('git.open-change', openChange)
];
return Disposable.from(...disposables);
}
\ No newline at end of file
......@@ -33,6 +33,7 @@ namespace schema {
case 'explorer/context': return MenuId.ExplorerContext;
case 'editor/title/context': return MenuId.EditorTitleContext;
case 'scm/title': return MenuId.SCMTitle;
case 'scm/context': return MenuId.SCMContext;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册