-
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
Add command Copy Path and bind handler for native VS Code command #7934
Conversation
I've checked all the described use cases. Works well. |
Signed-off-by: Vladyslav Zhukovskyi <[email protected]>
@vzhukovskii, VS Code does not provide a dedicated context-menu item for copying the file path, did you add it intentionally? Can we get rid of it? It would be great to keep the context menu aligned with VS Code and not to end up in a gigantic one with all actions just because we can add it there. What do you think? Also, the keybinding you have defined has a collision with |
Since this change does not work on macOS (due to the See the screencast:
|
We do not need the keybinding either. |
@vzhukovskii, @azatsarynnyy ping?
It seems the VS Code implementation has a |
@vzhukovskii Could you follow up on @kittaakos feedback please? 🙏 |
Guys, I am going to wait till next week and will create a revert commit afterward. |
@kittaakos, @akosyakov sorry for the late response, wasn't able to respond these days.
Yes, it was added intentionally. We can move this item menu from editor context menu to the editor's tab context menu. As in VS Code, there is such item. Agree, from the editor context menu it should be moved away.
I can remove keybinding at all, is this sounds good? I think, keybinding should work, when |
I see, so they put it there. Yes, it would be nice to do what VS Code does.
Sounds good to me, but as you wrote adding the proper |
Good, I'll prepare a PR to move item from the current place to editor's tab.
This need to be checked and if there isn't any odd behavior, I'll include |
🙏 Thank you! Feel free to name me if you need someone for the review.
No worries at all; it happens. |
What it does
This changes proposal provides ability to copy absolute path to the file. This can be reached by calling
Copy Path
item in context menu of explorer or opened editor. Also, this proposal provides additional commandcopyFilePath
, which is bridge between Theia and VS Code extension [1].[1] microsoft/vscode/src/vs/workbench/contrib/files/browser/fileCommands.ts#L247-L259
Use case 1.
![copyFilePath_usecase_1](https://user-images.githubusercontent.com/1968177/83407680-ec129580-a419-11ea-86a5-dc817a429fee.gif)
Copy Path call from Project Explorer:
Use case 2.
![copyFilePath_usecase_2](https://user-images.githubusercontent.com/1968177/83407716-fdf43880-a419-11ea-9fdd-c10536065ee8.gif)
Copy Path call from Opened Editor:
Use case 3.
![copyFilePath_usecase_3](https://user-images.githubusercontent.com/1968177/83407782-1a907080-a41a-11ea-9e1a-4087276f0b50.gif)
Call VS Code's command
copyFilePath
from third-party plugin:Use case 4.
![copyFilePath_usecase_4](https://user-images.githubusercontent.com/1968177/83407856-3dbb2000-a41a-11ea-8d88-717df88eb222.gif)
Call VS Code's command
copyFilePath
from third-party plugin when everything hidden:Needed for Didact extension, but temporary can't be reached in the last one because of dependent issue. So there is another way to check this PR.
Signed-off-by: Vladyslav Zhukovskyi [email protected]
How to test
Plugin to check the changes can be reached here.
For the calling items from context menus, it's enough to build Theia from the PR and try to copy file path.
Review checklist
Need to check on windows hotkey combination
shift+alt+c
, because of lack windows machine I can't be 100% sure, that this hotkey is free.as an author, I have thoroughly tested my changes and carefully followed the review guidelines
Reminder for reviewers