mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 01:58:53 +01:00
Add specific refactor.move scope for js/ts move to new file action
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user