mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
This commit is contained in:
@@ -156,6 +156,19 @@ const newCommands: ApiCommand[] = [
|
||||
new ApiCommandResult<IOutgoingCallDto[], types.CallHierarchyOutgoingCall[]>('A CallHierarchyItem or undefined', v => v.map(typeConverters.CallHierarchyOutgoingCall.to))
|
||||
),
|
||||
// --- rename
|
||||
new ApiCommand(
|
||||
'vscode.prepareRename', '_executePrepareRename', 'Execute the prepareRename of rename provider.',
|
||||
[ApiCommandArgument.Uri, ApiCommandArgument.Position],
|
||||
new ApiCommandResult<modes.RenameLocation, { range: types.Range, placeholder: string } | undefined>('A promise that resolves to a range and placeholder text.', value => {
|
||||
if (!value) {
|
||||
return undefined;
|
||||
}
|
||||
return {
|
||||
range: typeConverters.Range.to(value.range),
|
||||
placeholder: value.text
|
||||
};
|
||||
})
|
||||
),
|
||||
new ApiCommand(
|
||||
'vscode.executeDocumentRenameProvider', '_executeDocumentRenameProvider', 'Execute rename provider.',
|
||||
[ApiCommandArgument.Uri, ApiCommandArgument.Position, ApiCommandArgument.String.with('newName', 'The new symbol name')],
|
||||
|
||||
Reference in New Issue
Block a user