-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Implement editor.action.rename comand #5215
Comments
Just wanted to post this because it seems relevant to this and the other issues implementing the commands and it might be helpful (And I just happened to find this yesterday and I'm not sure if anyone knew). It looks like some of the commands are already registered and working they are just registered under different id's. I.e. editor.action.rename is monaco.editor.action.rename. I've just done a quick 5 minute test and it seems like we can just wrap the monaco.editor.action.rename command with something like commands.registerCommand({ id: 'editor.action.rename' }, {
execute: () => {
commands.executeCommand('monaco.editor.action.rename');
}
}); and it will work. I've tested with both typescript and java so far. It also looks like other commands that we need to implement for this sprint are accessible as well. |
In the past, we had trouble with that approach because the command registry in the editor was forwarding to the general registry and this was leading to an endless recursion. What is different here? Also, usually monaco stuff uses different coordinates (0-based vs. 1-based). Does all that pan out? |
So I've opened up a PR and verified that the three commands listed are behaving correctly. I guess I must have misread the commands list because editor.action.gotoDeclaration does not seem to be in the commands there (and it shouldn't be anyways because monaco needs to be updated). |
Implement the vs code built-in command editor.action.rename as mentioned in eclipse-che/che#13007
The text was updated successfully, but these errors were encountered: