Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command to trigger fileRename on specific resource #52515

Closed
mjbvz opened this issue Jun 20, 2018 · 2 comments
Closed

Command to trigger fileRename on specific resource #52515

mjbvz opened this issue Jun 20, 2018 · 2 comments
Labels
feature-request Request for new features or functionality rename
Milestone

Comments

@mjbvz
Copy link
Collaborator

mjbvz commented Jun 20, 2018

Problem
As part of some code actions, we would like to be able to trigger a file rename operation. For example, microsoft/TypeScript#51772 requests triggering a file rename when you run the mode to new file refactoring

Proposal
Extend the renameFile command or introduce a new command that allows triggering a rename on a specific resource. The editor.action.rename command allows something similar.

I believe this may already be possible using revealInExplorer followed by renameFile. This issue requests a more standardize approach

@mjbvz mjbvz added the feature-request Request for new features or functionality label Jun 20, 2018
@isidorn
Copy link
Contributor

isidorn commented Jun 21, 2018

Currently the renameFile command is tightly coupled to the explorer and that file actually being rendered in the explorer.
Thus as you correctly assumed what you need can only be done by using two command revealInExplorer and renameFile. If I understand correctly there is currently only one extension needing this, so for now simplly execute those two commands.
When there are more use cases we can investigate into adding a command on the vscode side that would essential just call those two commands

@isidorn isidorn added this to the Backlog milestone Jun 21, 2018
@isidorn isidorn removed their assignment Jun 21, 2018
@jrieken jrieken added the rename label Oct 8, 2019
@jrieken
Copy link
Member

jrieken commented Oct 8, 2019

We have this covered with better workspace edits (which allow to create, delete, and rename resources)

@jrieken jrieken closed this as completed Oct 8, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality rename
Projects
None yet
Development

No branches or pull requests

3 participants