提交 9ce14ae4 编写于 作者: M Matt Bierner

Add specific `refactor.move` scope for js/ts move to new file action

上级 6663aedb
......@@ -98,6 +98,7 @@ class SelectRefactorCommand implements Command {
export default class TypeScriptRefactorProvider implements vscode.CodeActionProvider {
private static readonly extractFunctionKind = vscode.CodeActionKind.RefactorExtract.append('function');
private static readonly extractConstantKind = vscode.CodeActionKind.RefactorExtract.append('constant');
private static readonly moveKind = vscode.CodeActionKind.Refactor.append('move');
constructor(
private readonly client: ITypeScriptServiceClient,
......@@ -177,6 +178,8 @@ export default class TypeScriptRefactorProvider implements vscode.CodeActionProv
return TypeScriptRefactorProvider.extractFunctionKind;
} else if (refactor.name.startsWith('constant_')) {
return TypeScriptRefactorProvider.extractConstantKind;
} else if (refactor.name.startsWith('Move')) {
return TypeScriptRefactorProvider.moveKind;
}
return vscode.CodeActionKind.Refactor;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册